package org.come.Jpanel;

import java.util.Properties;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSON;
import cn.hutool.json.JSONUtil;
import com.tool.btn.*;
import come.tool.Fighting.FightingMixDeal;
import org.codeCard.frame.CodeCardJFrame;
import org.come.Frame.*;
import org.come.bean.*;
import org.come.control.TestMain;
import org.come.entity.Fly;
import org.come.entity.Goodstable;
import org.come.entity.Mount;
import org.come.entity.RoleSummoning;
import org.come.entity.TeamRole;
import org.come.model.Configure;
import org.come.model.Eshop;
import org.come.model.Lingbao;
import org.come.model.Shop;
import org.come.mouslisten.*;
import org.come.tt.LadderBoxOpenMouslisten;
import org.come.tt.LadderPanelBtn;
import org.come.until.*;
import org.come.view.TaskGuideView;
import org.lottery.frame.LotteryMainFrame;

//import com.main.Main;
import com.tool.Document.RichDocument;
import com.tool.PanelDisplay.PetPanelShow;
import com.tool.PanelDisplay.RolePanelShow;
import com.tool.image.ImageMixDeal;
import com.tool.imagemonitor.FightingMonitor;
import com.tool.role.RoleData;
import com.tool.tcp.Sprite;
import com.tool.tcp.SpriteFactory;
import com.tool.tcpimg.UIUtils;
import com.updateNew.MyIsif;

import static org.come.until.ScrenceUntil.Screen_x;


public class ZhuJpanel extends JPanel {
    private RoleSummoning currentPetDisplayed = null;
    //读取配置
    ConfigureBean allConfigure = UserMessUntil.getConfigureBean();
    Map<BigDecimal, Configure> item = allConfigure.getAllConfigure();
    Configure configure = item.get(new BigDecimal(1));
    private Date uptime;
    private JLabel rolehp;
    private int caozuo;
    private JLabel rolemp;
    private JLabel roleexe;
    private JLabel bbhp;
    private JLabel bbmp;
    private JLabel bbexe;
    private String cjkg;
    private String mrqdkg;
    private String zzs;
    private String jjckg;
    private String mrczkg;
    private static JLabel MapName;
    private static JLabel Timemiao;//时间显示实例
    private static JLabel xAndY;
    private JLabel dangqian;
    private JLabel labnow;
    private JLabel labgroups;
    private JLabel labbangs;
    private JLabel labworld;
    private JLabel labnotice;
    private JLabel kjsfBtn;
    private JTextField SendMes;
    private JLabel jLabelSendMes, jLabelLeftMes, jLabelLeftMes1;

    private static SmallIconBtn lableft,// 向左图标
            labbottom,// 向下图标
            labtop,// 向上图标
            labstar,// 星星图标
            labadd,// 加号图标
            labminus;// 减号图标
    private static JLabel labbackground, labbackground1;
    private static JLabel ltldt;
    private static JLabel labrolehead;
    private static JLabel petlehead;
    private static JLabel labpetimg;
    private JLabel lowerRightImgBack;
    private static JLabel labroleimg;
    private static Date date;
    private static VipShopBtn recharge;
    private static FormsOnOffBtn  dtck, mapiconBtn, worldMap, guideBtn, czlbBtn, pdBtn, CBGBtn,  fuzhu, RanklistBtn, TJBtn, gangBtn, friendsBtn, taskBtn, childBtn, knapsackBtn, QianDaoMenu, bjczBtn, kuaijieBtn, hdrlBtn, hotKey;//设置systemBtn,
    private static MouseStyleBtn groupBtn;

    private static MouseStyleBtn pkBtn;
    private static MouseStyleBtn petBtn;//坐骑systemBtn
    private static MouseStyleBtn systemBtn;//设置
    private static MouseStyleBtn transactionBtn1;//交易菜单
    private static MouseStyleBtn rwjnBtn;
    private static List<Mount> listMount = new ArrayList<Mount>(); // 用来存放自己的坐骑集合
    private static List<Fly> ListFly = new ArrayList<>();// 用来存放自己的飞行器集合
    private static Goodstable goodstableAl;
    private static int UseGoodsType;
    private static Goodstable Nedangoods;
    private RolePanelShow choseRoleStateMouslisten;
    private PetPanelShow chosePetMouslisten;
    private ChoseDangQianMounslisten choseDangQianMounslisten;
    private ChoseNowMouslisten choseNowMouslisten;
    private ChoseGroupsMouslisten choseGroupsMouslisten;
    private ChoseBangsMouslisten choseBangsMouslisten;
    private ChoseWorldMouslisten choseWorldMouslisten;
    private ChoseNoticeMouslisten choseNoticeMouslisten;
    private JLabel ShopingMenu;
    private JLabel DrawMenu;
    private FormsOnOffBtn Dbiaoqing;
    private int TeamState = 0;
    public int mounState = 0;
    private FightingBtn zidong;
    private FightingBtn zidong111;//强退
    private FightingBtn fashu;
    private FightingBtn daoju;
    private FightingBtn fangyu;
    private FightingBtn baohu;
    //    private FightingBtn zhaohuan;
    private FightingBtn zhaohuan1;
    private FightingBtn zhaohui;
    private FightingBtn buzhua;
    private FightingBtn taopao;
    private FightingBtn tcpdBtn;
    private static FormsOnOffBtn rechargeBtn;
    private VipShopBtn oddsBtn;
    private VipShopBtn showVipBtn;
    private VipShopBtn showcaidan1;
    private VipShopBtn chongjiBtn;
    private VipShopBtn continuousBtn;
    private VipShopBtn caidan;
    private List<VipShopBtn> btnListVicon;
    private TaskGuideView taskGuideView;
    private TeamPanelBtn btnOperation;
    private TeamPanelBtn btnPlatform;
    private JLabel[] teamHeads;
    private AircraftBtn[] aircraftBtns;//飞行器
    private TeamPanelBtn[] teamOperations;private FightingBtn chehui;
    //泡点相关
    private JLabel startTime,//开始时间
            durationTime,//持续时间
            obtainExp,//获得经验
            spendSilver,//花费金钱
            spendxy,//花费仙玉xfzxy
            win,//胜利场次
            pdexp,//背景
            mexp;//标题

    //飞行器
    private AircraftBtn btnzuoqi;
    private AircraftBtn btnfeixingqi;
    private WorkshopBtn zdlh;
    private WorkshopBtn vipActive;
    private WorkshopBtn jyxyjs;
    private WorkshopBtn viplblq;
    private WorkshopBtn paltBtn;
    private WorkshopBtn lainOpenWeb;
    private WorkshopBtn testSetupJpanel;
    private WorkshopBtn szCbg;
    private WorkshopBtn transactionBtn;
    private WorkshopBtn getBtn;
    //
    public static boolean styles = false;
    static Sprite tcp1 = SpriteFactory.VloadSprite("resource/mouse/mall-border.tcp", null);//特效路径
    static Sprite tcp = SpriteFactory.VloadSprite("resource/mouse/mall-border.tcp", null);//特效路径

    private JLabel hotKeyBack;
    private ImageIcon icon = null;

    static {
        if (tcp == null) {
            tcp = tcp;

        }
    }

    public ZhuJpanel() {
        if ("开".equals(configure.getCjgnkg())) {
            cjkg = "开";
        } else {
            cjkg = "关";
        }
        jjckg = configure.getJjcgnkg();
        mrczkg = configure.getMrczkg();
        mrqdkg = configure.getMrqdgnkg();
        zzs = configure.getLzjskg();
        //获取当前坐骑

        if ("水墨UI".equals(MyIsif.getStyle())) {
            this.fightingbtn();
            fightingbtn();
            this.setPreferredSize(new Dimension(ScrenceUntil.Screen_x, ScrenceUntil.Screen_y));
            this.setLayout(null);
            if("开".equals(mrczkg)){
                rechargeBtn = new FormsOnOffBtn("skin/8100226/newbutton/hylh.png", 1, UIUtils.COLOR_BTNTEXT, "", 87);
                rechargeBtn.setBounds(143 +128, 80, 53, 53);
                this.add(rechargeBtn);
            }
            ImageIcon tips = new ImageIcon("inkImg/old/background/S33.png");
            this.labnotice = new JLabel();
            this.labnotice.setIcon(tips);
            this.labnotice.setBounds(10, ScrenceUntil.Screen_y - 161, 51, 25);
            this.labnotice.setForeground(Color.WHITE);
            this.labnotice.setText("传音");
            this.labnotice.setHorizontalTextPosition(0);
            this.labnotice.setFont(UIUtils.TEXT_FONT);
            this.choseNoticeMouslisten = new ChoseNoticeMouslisten(this);
            this.labnotice.addMouseListener(this.choseNoticeMouslisten);
            this.labnotice.setVisible(false);
            this.labworld = new JLabel();
            this.labworld.setIcon(tips);
            this.labworld.setBounds(10, ScrenceUntil.Screen_y - 134, 51, 25);
            this.labworld.setForeground(Color.WHITE);
            this.labworld.setText("世界");
            this.labworld.setHorizontalTextPosition(0);
            this.labworld.setFont(UIUtils.TEXT_FONT);
            this.choseWorldMouslisten = new ChoseWorldMouslisten(this);
            this.labworld.addMouseListener(this.choseWorldMouslisten);
            this.labworld.setVisible(false);
            this.labbangs = new JLabel();
            this.labbangs.setIcon(tips);
            this.labbangs.setBounds(10, ScrenceUntil.Screen_y - 107, 51, 25);
            this.labbangs.setForeground(Color.WHITE);
            this.labbangs.setText("帮派");
            this.labbangs.setHorizontalTextPosition(0);
            this.labbangs.setFont(UIUtils.TEXT_FONT);
            this.choseBangsMouslisten = new ChoseBangsMouslisten(this);
            this.labbangs.addMouseListener(this.choseBangsMouslisten);
            this.labbangs.setVisible(false);
            this.labgroups = new JLabel();
            this.labgroups.setIcon(tips);
            this.labgroups.setBounds(10, ScrenceUntil.Screen_y - 80, 51, 25);
            this.labgroups.setForeground(Color.WHITE);
            this.labgroups.setText("队伍");
            this.labgroups.setHorizontalTextPosition(0);
            this.labgroups.setFont(UIUtils.TEXT_FONT);
            this.choseGroupsMouslisten = new ChoseGroupsMouslisten(this);
            this.labgroups.addMouseListener(this.choseGroupsMouslisten);
            this.labgroups.setVisible(false);
            this.labnow = new JLabel();
            this.labnow.setIcon(tips);
            this.labnow.setBounds(10, ScrenceUntil.Screen_y - 53, 51, 25);
            this.labnow.setForeground(Color.WHITE);
            this.labnow.setText("当前");
            this.labnow.setHorizontalTextPosition(0);
            this.labnow.setFont(UIUtils.TEXT_FONT);
            this.choseNowMouslisten = new ChoseNowMouslisten(this);
            this.labnow.addMouseListener(this.choseNowMouslisten);
            this.labnow.setVisible(false);
            this.dangqian = new JLabel();
            this.dangqian.setBounds(10, ScrenceUntil.Screen_y - 26, 51, 25);
            this.dangqian.setForeground(Color.WHITE);
            this.dangqian.setText("当前");
            this.dangqian.setVerticalTextPosition(0);
            this.dangqian.setHorizontalTextPosition(0);
            this.dangqian.setFont(UIUtils.TEXT_HYK16);
            this.choseDangQianMounslisten = new ChoseDangQianMounslisten(this);
            this.dangqian.addMouseListener(this.choseDangQianMounslisten);
            this.SendMes = new JTextField(40);
            this.SendMes.setBounds(55, ScrenceUntil.Screen_y - 26, ScrenceUntil.SendMsg_x, 25);
            this.SendMes.setForeground(Color.white);
            this.SendMes.setBackground(UIUtils.Color_BACK);
            this.SendMes.setBorder(BorderFactory.createEmptyBorder());
            this.SendMes.setCaretColor(Color.WHITE);
            this.SendMes.setFont(UIUtils.TEXT_MSG);
            this.SendMes.setDocument(new RichDocument());
            this.SendMes.setFocusable(true);
            this.add(this.SendMes);
            this.setVisible(true);
            this.setFocusable(true);
            this.setFocusTraversalKeysEnabled(false);
            this.jLabelLeftMes = new JLabel();
            this.jLabelLeftMes.setIcon(new ImageIcon("inkImg/newbackground/ltsrk.png"));
            this.jLabelLeftMes.setBounds(0, ScrenceUntil.Screen_y - 43, 160, 43);
            jLabelLeftMes1 = new JLabel();
            jLabelLeftMes1.setIcon(new ImageIcon("inkImg/old/background/ltsrkkz.png"));
            jLabelLeftMes1.setBounds(170, ScrenceUntil.Screen_y - 43, 70, 43);
            this.add(this.dangqian);
            this.add(this.labnow);
            this.add(this.labgroups);
            this.add(this.labbangs);
            this.add(this.labworld);
            this.add(this.labnotice);
            this.add(this.jLabelLeftMes);
            //表情图标
            Dbiaoqing = new FormsOnOffBtn("inkImg/old/1/B325.png", 1, 985);
            Dbiaoqing.setBounds(205, 5, 35, 35);
            Dbiaoqing.addMouseListener(new WLLMouslisten(211));
            this.add(this.Dbiaoqing);

            this.add(this.jLabelLeftMes1);


            this.jLabelSendMes = new JLabel();
            this.jLabelSendMes.setIcon(CutButtonImage.getImage("inkImg/old/background/S31.png", ScrenceUntil.SendMsg_x + 10, -1));
            this.jLabelSendMes.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x + 10, 43);
//            this.add(this.jLabelSendMes);

            // * 0 上 1下 2清屏 3禁言 4左 5调大聊天框 6调小聊天框大小 7透明度改变
            // 左按钮
            lableft = new SmallIconBtn("skin/8100226/button/B44.png", 1, 4, "向左", this);
            this.add(lableft);
            // 下按钮
            labbottom = new SmallIconBtn("skin/8100226/button/B43.png", 1, 1, "向下", this);
            this.add(labbottom);
            // 上按钮
            labtop = new SmallIconBtn("skin/8100226/button/B42.png", 1, 0, "向上", this);
            this.add(labtop);
            // 星星
            labstar = new SmallIconBtn("skin/8100226/button/B41.png", 1, 7, "星星", this);
            this.add(labstar);
            // 加按钮
            labadd = new SmallIconBtn("skin/8100226/button/B35.png", 1, 5, "加号", this);
            this.add(labadd);
            // 减按钮
            labminus = new SmallIconBtn("skin/8100226/button/B36.png", 1, 6, "减号", this);
            this.add(labminus);
//按键
            bjczBtn = new FormsOnOffBtn("skin/8100226/newbutton/qqcd.png", 1, 3100);
            bjczBtn.addMouseListener(new WLLMouslisten(214));
            this.add(bjczBtn);
            childBtn = new FormsOnOffBtn("skin/8100226/newbutton/xhd.png", 1, 1);
            childBtn.addMouseListener(new WLLMouslisten(210));
            this.add(childBtn);
            knapsackBtn = new FormsOnOffBtn("skin/8100226/newbutton/djld.png", 1, 2);
            knapsackBtn.addMouseListener(new WLLMouslisten(209));
            this.add(knapsackBtn);
            groupBtn = new MouseStyleBtn("skin/8100226/newbutton/dwd.png", 1, "组队");
            groupBtn.addMouseListener(new WLLMouslisten(208));
            this.add(groupBtn);
            pkBtn = new MouseStyleBtn("skin/8100226/newbutton/pkd.png", 1, "切磋");
            pkBtn.addMouseListener(new WLLMouslisten(207));
            this.add(pkBtn);
            transactionBtn1 = new MouseStyleBtn("skin/8100226/newbutton/jyd.png", 1, "交易菜单");
            transactionBtn1.addMouseListener(new WLLMouslisten(206));
            this.add(transactionBtn1);
            rwjnBtn = new MouseStyleBtn("skin/8100226/newbutton/jnd.png", 1, "技能");
            rwjnBtn.addMouseListener(new WLLMouslisten(205));
            this.add(rwjnBtn);
            petBtn = new MouseStyleBtn("skin/8100226/newbutton/zqd.png", 1, "坐骑");
            petBtn.addMouseListener(new WLLMouslisten(204));
            this.add(petBtn);
            taskBtn = new FormsOnOffBtn("skin/8100226/newbutton/rwd.png", 1, 3);
            taskBtn.addMouseListener(new WLLMouslisten(203));
            this.add(taskBtn);
            friendsBtn = new FormsOnOffBtn("skin/8100226/newbutton/hyd.png", 1, 4);
            friendsBtn.addMouseListener(new WLLMouslisten(202));
            this.add(friendsBtn);
            gangBtn = new FormsOnOffBtn("skin/8100226/newbutton/bpd.png", 1, 48);
            gangBtn.addMouseListener(new WLLMouslisten(201));
            this.add(gangBtn);

            systemBtn = new MouseStyleBtn("skin/8100226/newbutton/szd.png", 1, "设置");
            systemBtn.addMouseListener(new WLLMouslisten(200));
            this.add(systemBtn);

            this.lowerRightImgBack = new JLabel();
            this.lowerRightImgBack.setIcon(new ImageIcon("inkImg/newbackground/keybarT.png"));
            this.lowerRightImgBack.setBounds(ScrenceUntil.Screen_x - 468, ScrenceUntil.Screen_y - 38, 468, 39);
            this.add(this.lowerRightImgBack);

            labpetimg = new JLabel();
            labpetimg.setBounds(ScrenceUntil.Screen_x - 302, 2, 48, 48);
            labpetimg.addMouseListener(new WLLMouslisten(21));
            this.chosePetMouslisten = new PetPanelShow();
            labpetimg.addMouseListener(this.chosePetMouslisten);
            this.add(labpetimg);

            labroleimg = new JLabel();
            labroleimg.setBounds(ScrenceUntil.Screen_x - 162, 2, 58, 58);
            labroleimg.addMouseListener(new WLLMouslisten(20));
            this.choseRoleStateMouslisten = new RolePanelShow();
            labroleimg.addMouseListener(this.choseRoleStateMouslisten);

            // 从本地文件中获取头像路径
            String roleAvatarPath = null;
            String currentSpeciesId = null;
            try {
                final LoginResult login = RoleData.getRoleData().getLoginResult();
                if (login != null && login.getSpecies_id() != null) {
                    currentSpeciesId = login.getSpecies_id().toString();
                    if (login.getRole_id() != null) {
                        String roleId = login.getRole_id().toString();
                        Properties props = new Properties();
                        File file = new File("resource/other/avatar_" + roleId + ".properties");
                        if (file.exists()) {
                            FileInputStream fis = new FileInputStream(file);
                            props.load(fis);
                            fis.close();

                            // 检查保存的种族ID是否与当前种族ID一致
                            String savedSpeciesId = props.getProperty("speciesId", "");

                            // 如果种族ID一致，则尝试加载自定义头像
                            if (savedSpeciesId.equals(currentSpeciesId)) {
                                roleAvatarPath = props.getProperty("avatarPath", "");
                            } else {
                                // 种族ID不一致，说明发生了转换，更新配置文件
                                props.setProperty("speciesId", currentSpeciesId);
                                // 清除旧的头像路径
                                props.remove("avatarPath");

                                // 保存更新后的配置
                                FileOutputStream fos = new FileOutputStream(file);
                                props.store(fos, "Avatar configuration updated for role " + roleId);
                                fos.close();
                            }
                        } else {
                            // 配置文件不存在，创建新配置文件
                            props.setProperty("speciesId", currentSpeciesId);
                            FileOutputStream fos = new FileOutputStream(file);
                            props.store(fos, "Avatar configuration for role " + roleId);
                            fos.close();
                        }
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
            }

            // 如果有头像路径则使用，否则使用默认头像
            if (roleAvatarPath != null && !roleAvatarPath.isEmpty()) {
                File avatarFile = new File(roleAvatarPath);
                if (avatarFile.exists()) {
                    try {
                        ImageIcon icon = new ImageIcon(roleAvatarPath);
                        Image img = icon.getImage().getScaledInstance(58, 58, Image.SCALE_SMOOTH);
                        icon = new ImageIcon(img);
                        labroleimg.setIcon(icon);
                    } catch (Exception e) {
                        // 加载自定义头像失败，使用默认头像
                        ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                        labroleimg.setIcon(defaultIcon);
                    }
                } else {
                    // 自定义头像文件不存在，使用默认头像
                    ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                    labroleimg.setIcon(defaultIcon);
                }
            } else {
                // 没有自定义头像设置或角色信息不完整，使用默认头像
                String defaultSpeciesId = (currentSpeciesId != null) ? currentSpeciesId : "1";
                ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + defaultSpeciesId + ".png", 58, 58);
                labroleimg.setIcon(defaultIcon);
            }

            this.add(labroleimg);

            /**==========================召唤兽经验=====================================*/
            this.bbexe = new JLabel();
            this.bbexe.addMouseListener(new WLLMouslisten(29));
            this.add(this.bbexe);
            /**==========================召唤兽血条=====================================*/
            this.bbhp = new JLabel();
            this.bbhp.addMouseListener(new ZDCYMouslisten(2));
            this.add(this.bbhp);
            /**==========================召唤兽蓝条=====================================*/
            this.bbmp = new JLabel();
            this.bbmp.addMouseListener(new ZDCYMouslisten(3));
            this.add(this.bbmp);
            /**==========================角色经验=====================================*/
            roleexe = new JLabel();
            roleexe.addMouseListener(new WLLMouslisten(28));
            this.add(this.roleexe);
            /**==========================角色血条=====================================*/
            this.rolehp = new JLabel();
            this.rolehp.addMouseListener(new ZDCYMouslisten(0));
            this.add(this.rolehp);
            /**==========================角色蓝条=====================================*/
            this.rolemp = new JLabel();
            this.rolemp.addMouseListener(new ZDCYMouslisten(1));
            this.add(this.rolemp);
            /**==========================人物头像显示=====================================*/
            labrolehead = new JLabel();
            labrolehead.setIcon(new ImageIcon("inkImg/newbackground/rwtxl.png"));
            this.add(labrolehead);

            /**==========================召唤兽头像显示=====================================*/
            petlehead = new JLabel();
            this.petlehead.setIcon(new ImageIcon("inkImg/newbackground/cwtxl.png"));
            this.add(petlehead);
            /**==========================地图=====================================*/
            MapName = new JLabel();
            MapName.setBounds(15, 6, 80, 20);
            MapName.setForeground(Color.yellow);
            this.add(MapName);
            /**==========================时间显示实例=====================================*/

            //时辰显示关闭
            Timemiao = new JLabel();
            Timemiao.addMouseListener(new WLLMouslisten(0));
            Timemiao.setBounds(6 + 20 * 5, 43, 50, 20);//时辰显示关闭
            Timemiao.setForeground(UIUtils.COLOR_WHITE1[0]);
            Timemiao.setFont(UIUtils.TEXT_FONTZS);
            this.add(Timemiao);
            /**==========================坐标=====================================*/

            xAndY = new JLabel();
            xAndY.setBounds(45, 11, 180, 20);
            xAndY.setForeground(Color.white);
            this.add(xAndY);

            /**==========================坐标=====================================*/

            // 每日活动
            TJBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB1.png", 1, UIUtils.COLOR_BTNTEXT, "", 3072);
            TJBtn.setBounds(2, 45, 20, 20);
            TJBtn.addMouseListener(new WLLMouslisten(304));
            this.add(TJBtn);

            // 排行榜
            RanklistBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB2.png", 1, UIUtils.COLOR_BTNTEXT, "", 60);
            RanklistBtn.setBounds(2 + 22, 45, 20, 20);
            RanklistBtn.addMouseListener(new WLLMouslisten(305));
            this.add(RanklistBtn);
            // 藏宝阁
            CBGBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB3.png", 1, UIUtils.COLOR_BTNTEXT, "", 78);
            CBGBtn.setBounds(2 + 22 * 2, 45, 20, 20);
            CBGBtn.addMouseListener(new WLLMouslisten(306));
            this.add(CBGBtn);

            //活动日历
            hdrlBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB4.png", 1, UIUtils.COLOR_BTNTEXT, "", 40);
            hdrlBtn.setBounds(2 + 22 * 3, 45, 35, 20);
            hdrlBtn.addMouseListener(new WLLMouslisten(307));
            this.add(hdrlBtn);

//        //全民竞猜
//        cpBtn = new FormsOnOffBtn("skin/8100226/button/2竞猜.png", 1, UIUtils.COLOR_BTNTEXT, "", 1105);
//        cpBtn.setBounds(78, 35, 34, 18);
//        if(configure.getQmjckg().equals("开")) {
//            this.add(cpBtn);
//        }
            //左上角小地图图标
            mapiconBtn = new FormsOnOffBtn("skin/8100226/newbutton/B61.png", 1, 22);
            mapiconBtn.setBounds(182, 23, 20, 20);
            mapiconBtn.addMouseListener(new WLLMouslisten(302));
            this.add(mapiconBtn);
            //左上角世界地图图标
            worldMap = new FormsOnOffBtn("skin/8100226/newbutton/B62.png", 1, 1102);
            worldMap.setBounds(182, 3, 20, 20);
            worldMap.addMouseListener(new WLLMouslisten(303));
            this.add(worldMap);

            //飞行器
            this.aircraftBtns = new AircraftBtn[2];
            for (int i = 0; i < this.aircraftBtns.length; ++i) {
                this.aircraftBtns[i] = new AircraftBtn("inkImg/hongmu/2/btnCommon102.png", 1, i == 0 ? "坐骑" : "飞行器", UIUtils.TEXT_FONT, UIUtils.COLOR_RED_BTNTEXT, i + 10, this);
                this.aircraftBtns[i].setBounds(ScrenceUntil.Screen_x - 181, ScrenceUntil.Screen_y - (67 - i * 17), 102, 17);
                this.aircraftBtns[i].setVisible(false);
                this.add(this.aircraftBtns[i]);
            }
            this.btnzuoqi = new AircraftBtn("skin/8100226/newbutton/syaj.png", 1, "坐  骑", UIUtils.TEXT_HY16s, UIUtils.COLOR_WHITE1, 10, this);
            this.btnzuoqi.setBounds(ScrenceUntil.Screen_x - 302, ScrenceUntil.Screen_y - 67, 117, 24);
            this.btnzuoqi.addMouseListener(new WLLMouslisten(212));
            this.btnzuoqi.setVisible(false);
            this.add(this.btnzuoqi);
            btnfeixingqi = new AircraftBtn("skin/8100226/newbutton/syaj.png", 1, "飞  行", UIUtils.TEXT_HY16s, UIUtils.COLOR_WHITE1, 11, this);
            this.btnfeixingqi.setBounds(ScrenceUntil.Screen_x - 302, ScrenceUntil.Screen_y - 50, 117, 24);
            this.btnfeixingqi.addMouseListener(new WLLMouslisten(213));
            this.btnfeixingqi.setVisible(false);
            this.add(this.btnfeixingqi);

            paltBtn = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "退出游戏", 20);
            this.paltBtn.setVisible(false);
            this.add(this.paltBtn);

            testSetupJpanel = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "游戏设置", 200);
            this.testSetupJpanel.setVisible(false);
            this.add(this.testSetupJpanel);

            lainOpenWeb = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "联系客服", 201);
            this.lainOpenWeb.setVisible(false);
            this.add(this.lainOpenWeb);

            szCbg = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "藏宝阁", 202);
            this.szCbg.setVisible(false);
            this.add(this.szCbg);

            viplblq = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "VIP礼包", 199);
            this.viplblq.setVisible(false);
            this.add(this.viplblq);

            jyxyjs = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "全民竞猜", 1098);
            this.jyxyjs.setVisible(false);
            this.add(this.jyxyjs);

//            xyjys = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "协议及隐私", 195);
//            this.xyjys.setVisible(false);
//            this.add(this.xyjys);

            zdlh = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "自动炼化", 196);
            this.zdlh.setVisible(false);
            this.add(this.zdlh);

            vipActive = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "自动任务", 197);
            this.vipActive.setVisible(false);
            this.add(this.vipActive);

            transactionBtn = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "交  易", 203);
            this.transactionBtn.setVisible(false);
            this.add(this.transactionBtn);

            getBtn = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "给  予", 204);
            this.getBtn.setVisible(false);
            this.add(this.getBtn);

            //新手引导
            guideBtn = new FormsOnOffBtn("skin/8100226/newbutton/ttIco.png", 1, 604);
            guideBtn.setBounds(20, 78, 53, 53);
            this.add(guideBtn);

            //充值礼包
            czlbBtn = new FormsOnOffBtn("skin/8100226/button/gift-btn.png", 1, 3002);//CHA
            czlbBtn.setBounds(140, 78, 0, 0);
            if ("开".equals(configure.getLbzxkg())) {
                this.add(czlbBtn);
            }

            //冲等礼包
            this.chongjiBtn = new VipShopBtn("skin/8100226/newbutton/SS70.png", 1, 50);
//            chongjiBtn.addMouseListener(new WLLMouslisten(8));
            this.chongjiBtn.setBounds(79, 80, 53, 53);
            if ("开".equals(configure.getLbzxkg())) {
                this.add(this.chongjiBtn);
            }
            //激情泡点
            pdBtn = new FormsOnOffBtn("skin/8100226/button/pd.png", 1, 3003);//CHA
            if ("开".equals(configure.getPdgnkg())) {
                this.add(pdBtn);
            }
            // 快捷操作
            kuaijieBtn = new FormsOnOffBtn("inkImg/button/B420.png", 1, 3100);//CHA
            kuaijieBtn.setBounds(145, 80, 53, 53);
            this.add(kuaijieBtn);

            //        //签到 fei119
            this.QianDaoMenu = new FormsOnOffBtn("inkImg/newbutton/qiandao.png", 1, UIUtils.COLOR_BTNTEXT, "签", 1100);
            this.QianDaoMenu.setBounds(144 +64, 80, 53, 53);;
            if ("开".equals(configure.getQmjckg())) {
                this.add(QianDaoMenu);
            }

            labbackground = new JLabel();
            labbackground.setIcon(new ImageIcon("inkImg/newbackground/S30.png"));
            labbackground.setBounds(0, 0, 201, 67);
            this.add(labbackground);

            ltldt = new JLabel();
            ltldt.setIcon(new ImageIcon("inkImg/old/1/chatjpanel_ltck.png"));
            this.add(ltldt);


            ShopingMenu = new JLabel();
            ShopingMenu.setBounds(205, 5, 35, 35);
            // 打开商城
            ShopingMenu.addMouseListener(new OnlineShopingOpenShopMouslisten());
            ShopingMenu.addMouseListener(new WLLMouslisten(300));
            this.add(ShopingMenu);
            // 设置抽奖按钮
            if ("开".equals(configure.getCjgnkg())) {
                DrawMenu = new JLabel();
                DrawMenu.setBounds(205 + 40, 5, 35, 35);
                DrawMenu.addMouseListener(new WLLMouslisten(308));
                // 打开抽奖
                DrawMenu.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mousePressed(MouseEvent e) {
                        // TODO Auto-generated method stub
                        LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getlotteryTypeGoods(1);
                        FormsManagement.showForm(87);
                    }
                });
                this.add(DrawMenu);
            }
            this.setBackground(UIUtils.Color_BACK);
            this.btnOperation = new TeamPanelBtn("skin/8100226/newbutton/syaj.png", 1, "组队操作", UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, this);
            this.btnOperation.setBounds(ScrenceUntil.Screen_x - 291, ScrenceUntil.Screen_y - 67, 117, 24);
            this.btnOperation.setVisible(false);
            this.add(this.btnOperation);
            this.btnPlatform = new TeamPanelBtn("skin/8100226/newbutton/syaj.png", 1, "组队平台", UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, this);
            this.btnPlatform.setBounds(ScrenceUntil.Screen_x - 291, ScrenceUntil.Screen_y - 50, 117, 24);
            this.btnPlatform.setVisible(false);
            this.add(this.btnPlatform);

            this.taskGuideView = new TaskGuideView();
            this.add(this.taskGuideView);


            this.kjsfBtn = new JLabel();
            this.kjsfBtn.setIcon(new ImageIcon("inkImg/hongmu/2/快捷_w250.png"));
            this.kjsfBtn.setBounds(ScrenceUntil.Screen_x - 338, ScrenceUntil.Screen_y - 38, 338, 38);
//      this.add(this.kjsfBtn);

//左上角扩展快捷
            this.caidan = new VipShopBtn("skin/8100226/newbutton/sjajgb.png", 1, 56);
            caidan.addMouseListener(new WLLMouslisten(7));
            this.add(this.caidan);

            ImageIcon hotKeyBackImg = new ImageIcon("inkImg/newbackground/xbbkjl.png");
            hotKeyMethod(hotKeyBackImg);

        } else {
            this.fightingbtn();
            fightingbtn();
            this.setPreferredSize(new Dimension(ScrenceUntil.Screen_x, ScrenceUntil.Screen_y));
            this.setLayout(null);
            if("开".equals(mrczkg)){
                rechargeBtn = new FormsOnOffBtn("skin/8100226/newbutton/hylh.png", 1, UIUtils.COLOR_BTNTEXT, "", 87);
                rechargeBtn.setBounds(143 +128, 80, 53, 53);
                this.add((Component) rechargeBtn);
            }
            ImageIcon tips = new ImageIcon("inkImg/old/background/S33.png");
            this.labnotice = new JLabel();
            this.labnotice.setIcon(tips);
            this.labnotice.setBounds(10, ScrenceUntil.Screen_y - 161, 51, 25);
            this.labnotice.setForeground(Color.WHITE);
            this.labnotice.setText("传音");
            this.labnotice.setHorizontalTextPosition(0);
            this.labnotice.setFont(UIUtils.TEXT_FONT);
            this.choseNoticeMouslisten = new ChoseNoticeMouslisten(this);
            this.labnotice.addMouseListener(this.choseNoticeMouslisten);
            this.labnotice.setVisible(false);
            this.labworld = new JLabel();
            this.labworld.setIcon(tips);
            this.labworld.setBounds(10, ScrenceUntil.Screen_y - 134, 51, 25);
            this.labworld.setForeground(Color.WHITE);
            this.labworld.setText("世界");
            this.labworld.setHorizontalTextPosition(0);
            this.labworld.setFont(UIUtils.TEXT_FONT);
            this.choseWorldMouslisten = new ChoseWorldMouslisten(this);
            this.labworld.addMouseListener(this.choseWorldMouslisten);
            this.labworld.setVisible(false);
            this.labbangs = new JLabel();
            this.labbangs.setIcon(tips);
            this.labbangs.setBounds(10, ScrenceUntil.Screen_y - 107, 51, 25);
            this.labbangs.setForeground(Color.WHITE);
            this.labbangs.setText("帮派");
            this.labbangs.setHorizontalTextPosition(0);
            this.labbangs.setFont(UIUtils.TEXT_FONT);
            this.choseBangsMouslisten = new ChoseBangsMouslisten(this);
            this.labbangs.addMouseListener(this.choseBangsMouslisten);
            this.labbangs.setVisible(false);
            this.labgroups = new JLabel();
            this.labgroups.setIcon(tips);
            this.labgroups.setBounds(10, ScrenceUntil.Screen_y - 80, 51, 25);
            this.labgroups.setForeground(Color.WHITE);
            this.labgroups.setText("队伍");
            this.labgroups.setHorizontalTextPosition(0);
            this.labgroups.setFont(UIUtils.TEXT_FONT);
            this.choseGroupsMouslisten = new ChoseGroupsMouslisten(this);
            this.labgroups.addMouseListener(this.choseGroupsMouslisten);
            this.labgroups.setVisible(false);
            this.labnow = new JLabel();
            this.labnow.setIcon(tips);
            this.labnow.setBounds(10, ScrenceUntil.Screen_y - 53, 51, 25);
            this.labnow.setForeground(Color.WHITE);
            this.labnow.setText("当前");
            this.labnow.setHorizontalTextPosition(0);
            this.labnow.setFont(UIUtils.TEXT_FONT);
            this.choseNowMouslisten = new ChoseNowMouslisten(this);
            this.labnow.addMouseListener(this.choseNowMouslisten);
            this.labnow.setVisible(false);
            this.dangqian = new JLabel();
            this.dangqian.setBounds(10, ScrenceUntil.Screen_y - 26, 51, 25);
            this.dangqian.setForeground(Color.WHITE);
            this.dangqian.setText("当前");
            this.dangqian.setVerticalTextPosition(0);
            this.dangqian.setHorizontalTextPosition(0);
            this.dangqian.setFont(UIUtils.TEXT_HYK16);
            this.choseDangQianMounslisten = new ChoseDangQianMounslisten(this);
            this.dangqian.addMouseListener(this.choseDangQianMounslisten);
            this.SendMes = new JTextField(40);
            this.SendMes.setBounds(55, ScrenceUntil.Screen_y - 26, ScrenceUntil.SendMsg_x, 25);
            this.SendMes.setForeground(Color.white);
            this.SendMes.setBackground(UIUtils.Color_BACK);
            this.SendMes.setBorder(BorderFactory.createEmptyBorder());
            this.SendMes.setCaretColor(Color.WHITE);
            this.SendMes.setFont(UIUtils.TEXT_MSG);
            this.SendMes.setDocument(new RichDocument());
            this.SendMes.setFocusable(true);
            this.add(this.SendMes);
            this.setVisible(true);
            this.setFocusable(true);
            this.setFocusTraversalKeysEnabled(false);
            this.jLabelLeftMes = new JLabel();
            this.jLabelLeftMes.setIcon(new ImageIcon("inkImg/hongmu/1/ltsrkh.png"));
            this.jLabelLeftMes.setBounds(0, ScrenceUntil.Screen_y - 43, 160, 43);
            jLabelLeftMes1 = new JLabel();
            jLabelLeftMes1.setIcon(new ImageIcon("inkImg/hongmu/2/聊天框0000大1.png"));
            jLabelLeftMes1.setBounds(70, ScrenceUntil.Screen_y - 21, ScrenceUntil.Screen_x + 70, 25);

            this.add(this.dangqian);
            this.add(this.labnow);
            this.add(this.labgroups);
            this.add(this.labbangs);
            this.add(this.labworld);
            this.add(this.labnotice);
            this.add(this.jLabelLeftMes);
            //表情图标
            Dbiaoqing = new FormsOnOffBtn("inkImg/old/1/B325.png", 1, 985);
            Dbiaoqing.setBounds(205, 5, 35, 35);
            Dbiaoqing.addMouseListener(new WLLMouslisten(211));
            this.add(this.Dbiaoqing);


            this.add(this.jLabelLeftMes1);
            this.jLabelSendMes = new JLabel();
            this.jLabelSendMes.setIcon(CutButtonImage.getImage("inkImg/old/background/S31.png", ScrenceUntil.SendMsg_x + 10, -1));
            this.jLabelSendMes.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x + 10, 43);
//            this.add(this.jLabelSendMes);

            // * 0 上 1下 2清屏 3禁言 4左 5调大聊天框 6调小聊天框大小 7透明度改变
            // 左按钮
            lableft = new SmallIconBtn("skin/8100226/button/B44.png", 1, 4, "向左", this);
            this.add(lableft);
            // 下按钮
            labbottom = new SmallIconBtn("skin/8100226/button/B43.png", 1, 1, "向下", this);
            this.add(labbottom);
            // 上按钮
            labtop = new SmallIconBtn("skin/8100226/button/B42.png", 1, 0, "向上", this);
            this.add(labtop);
            // 星星
            labstar = new SmallIconBtn("skin/8100226/button/B41.png", 1, 7, "星星", this);
            this.add(labstar);
            // 加按钮
            labadd = new SmallIconBtn("skin/8100226/button/B35.png", 1, 5, "加号", this);
            this.add(labadd);
            // 减按钮
            labminus = new SmallIconBtn("skin/8100226/button/B36.png", 1, 6, "减号", this);
            this.add(labminus);

//按键


            bjczBtn = new FormsOnOffBtn("skin/8100226/newbutton/qqcdh.png", 1, 3100);
            bjczBtn.addMouseListener(new WLLMouslisten(214));
            this.add(bjczBtn);
            childBtn = new FormsOnOffBtn("skin/8100226/newbutton/xhdh.png", 1, 1);
            childBtn.addMouseListener(new WLLMouslisten(210));
            this.add(childBtn);
            knapsackBtn = new FormsOnOffBtn("skin/8100226/newbutton/djldh.png", 1, 2);
            knapsackBtn.addMouseListener(new WLLMouslisten(209));
            this.add(knapsackBtn);
            groupBtn = new MouseStyleBtn("skin/8100226/newbutton/dwdh.png", 1, "组队");
            groupBtn.addMouseListener(new WLLMouslisten(208));
            this.add(groupBtn);
            pkBtn = new MouseStyleBtn("skin/8100226/newbutton/pkdh.png", 1, "切磋");
            pkBtn.addMouseListener(new WLLMouslisten(207));
            this.add(pkBtn);
            transactionBtn1 = new MouseStyleBtn("skin/8100226/newbutton/jydh.png", 1, "交易菜单");
            transactionBtn1.addMouseListener(new WLLMouslisten(206));
            this.add(transactionBtn1);
            rwjnBtn = new MouseStyleBtn("skin/8100226/newbutton/jndh.png", 1, "技能");
            rwjnBtn.addMouseListener(new WLLMouslisten(205));
            this.add(rwjnBtn);
            petBtn = new MouseStyleBtn("skin/8100226/newbutton/zqdh.png", 1, "坐骑");
            petBtn.addMouseListener(new WLLMouslisten(204));
            this.add(petBtn);
            taskBtn = new FormsOnOffBtn("skin/8100226/newbutton/rwdh.png", 1, 3);
            taskBtn.addMouseListener(new WLLMouslisten(203));
            this.add(taskBtn);
            friendsBtn = new FormsOnOffBtn("skin/8100226/newbutton/hydh.png", 1, 4);
            friendsBtn.addMouseListener(new WLLMouslisten(202));
            this.add(friendsBtn);
            gangBtn = new FormsOnOffBtn("skin/8100226/newbutton/bpdh.png", 1, 48);
            gangBtn.addMouseListener(new WLLMouslisten(201));
            this.add(gangBtn);

            systemBtn = new MouseStyleBtn("skin/8100226/newbutton/szdh.png", 1, "设置");
            systemBtn.addMouseListener(new WLLMouslisten(200));
            this.add(systemBtn);

            this.lowerRightImgBack = new JLabel();
            this.lowerRightImgBack.setIcon(new ImageIcon("inkImg/hongmu/keybarTh.png"));
            this.lowerRightImgBack.setBounds(ScrenceUntil.Screen_x - 468, ScrenceUntil.Screen_y - 38, 468, 39);
            this.add(this.lowerRightImgBack);

            labpetimg = new JLabel();
            labpetimg.setBounds(ScrenceUntil.Screen_x - 302, 2, 48, 48);
            labpetimg.addMouseListener(new WLLMouslisten(21));
            this.chosePetMouslisten = new PetPanelShow();
            labpetimg.addMouseListener(this.chosePetMouslisten);
            this.add(labpetimg);

            labroleimg = new JLabel();
            labroleimg.setBounds(ScrenceUntil.Screen_x - 162, 2, 58, 58);
            labroleimg.addMouseListener(new WLLMouslisten(20));
            this.choseRoleStateMouslisten = new RolePanelShow();
            labroleimg.addMouseListener(this.choseRoleStateMouslisten);

            // 从本地文件中获取头像路径
            String roleAvatarPath = null;
            String currentSpeciesId = null;
            try {
                final LoginResult login = RoleData.getRoleData().getLoginResult();
                if (login != null && login.getSpecies_id() != null) {
                    currentSpeciesId = login.getSpecies_id().toString();
                    if (login.getRole_id() != null) {
                        String roleId = login.getRole_id().toString();
                        Properties props = new Properties();
                        File file = new File("resource/other/avatar_" + roleId + ".properties");
                        if (file.exists()) {
                            FileInputStream fis = new FileInputStream(file);
                            props.load(fis);
                            fis.close();

                            // 检查保存的种族ID是否与当前种族ID一致
                            String savedSpeciesId = props.getProperty("speciesId", "");

                            // 如果种族ID一致，则尝试加载自定义头像
                            if (savedSpeciesId.equals(currentSpeciesId)) {
                                roleAvatarPath = props.getProperty("avatarPath", "");
                            } else {
                                // 种族ID不一致，说明发生了转换，更新配置文件
                                props.setProperty("speciesId", currentSpeciesId);
                                // 清除旧的头像路径
                                props.remove("avatarPath");

                                // 保存更新后的配置
                                FileOutputStream fos = new FileOutputStream(file);
                                props.store(fos, "Avatar configuration updated for role " + roleId);
                                fos.close();
                            }
                        } else {
                            // 配置文件不存在，创建新配置文件
                            props.setProperty("speciesId", currentSpeciesId);
                            FileOutputStream fos = new FileOutputStream(file);
                            props.store(fos, "Avatar configuration for role " + roleId);
                            fos.close();
                        }
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
            }

            // 如果有头像路径则使用，否则使用默认头像
            if (roleAvatarPath != null && !roleAvatarPath.isEmpty()) {
                File avatarFile = new File(roleAvatarPath);
                if (avatarFile.exists()) {
                    try {
                        ImageIcon icon = new ImageIcon(roleAvatarPath);
                        Image img = icon.getImage().getScaledInstance(58, 58, Image.SCALE_SMOOTH);
                        icon = new ImageIcon(img);
                        labroleimg.setIcon(icon);
                    } catch (Exception e) {
                        // 加载自定义头像失败，使用默认头像
                        ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                        labroleimg.setIcon(defaultIcon);
                    }
                } else {
                    // 自定义头像文件不存在，使用默认头像
                    ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                    labroleimg.setIcon(defaultIcon);
                }
            } else {
                // 没有自定义头像设置或角色信息不完整，使用默认头像
                String defaultSpeciesId = (currentSpeciesId != null) ? currentSpeciesId : "1";
                ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + defaultSpeciesId + ".png", 58, 58);
                labroleimg.setIcon(defaultIcon);
            }

            this.add(labroleimg);

            /**==========================召唤兽经验=====================================*/
            this.bbexe = new JLabel();
            this.bbexe.addMouseListener(new WLLMouslisten(29));
            this.add(this.bbexe);
            /**==========================召唤兽血条=====================================*/
            this.bbhp = new JLabel();
            this.bbhp.addMouseListener(new ZDCYMouslisten(2));
            this.add(this.bbhp);
            /**==========================召唤兽蓝条=====================================*/
            this.bbmp = new JLabel();
            this.bbmp.addMouseListener(new ZDCYMouslisten(3));
            this.add(this.bbmp);
            /**==========================角色经验=====================================*/
            roleexe = new JLabel();
            roleexe.addMouseListener(new WLLMouslisten(28));
            this.add(this.roleexe);
            /**==========================角色血条=====================================*/
            this.rolehp = new JLabel();
            this.rolehp.addMouseListener(new ZDCYMouslisten(0));
            this.add(this.rolehp);
            /**==========================角色蓝条=====================================*/
            this.rolemp = new JLabel();
            this.rolemp.addMouseListener(new ZDCYMouslisten(1));
            this.add(this.rolemp);
            /**==========================人物头像显示=====================================*/
            labrolehead = new JLabel();
            labrolehead.setIcon(new ImageIcon("inkImg/hongmu/rwtxlh.png"));
            this.add(labrolehead);
            /**==========================召唤兽头像显示=====================================*/
            petlehead = new JLabel();
            this.petlehead.setIcon(new ImageIcon("inkImg/hongmu/cwtxlh.png"));
            this.add(petlehead);
            /**==========================地图=====================================*/
            MapName = new JLabel();
            MapName.setBounds(15, 6, 80, 20);
            MapName.setForeground(Color.yellow);
            this.add(MapName);
            /**==========================时间显示实例=====================================*/

            //时辰显示关闭
            Timemiao = new JLabel();
            Timemiao.addMouseListener(new WLLMouslisten(0));
            Timemiao.setBounds(6 + 20 * 5, 43, 50, 20);//时辰显示关闭
            Timemiao.setForeground(UIUtils.COLOR_WHITE1[0]);
            Timemiao.setFont(UIUtils.TEXT_FONTZS);
            this.add(Timemiao);
            /**==========================坐标=====================================*/

            xAndY = new JLabel();
            xAndY.setBounds(45, 11, 180, 20);
            xAndY.setForeground(Color.white);
            this.add(xAndY);

            /**==========================坐标=====================================*/


            // 每日活动
            TJBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB1h.png", 1, UIUtils.COLOR_BTNTEXT, "", 3072);
            TJBtn.setBounds(2, 45, 20, 20);
            TJBtn.addMouseListener(new WLLMouslisten(304));
            this.add(TJBtn);

            // 排行榜
            RanklistBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB2h.png", 1, UIUtils.COLOR_BTNTEXT, "", 60);
            RanklistBtn.setBounds(2 + 22, 45, 20, 20);
            RanklistBtn.addMouseListener(new WLLMouslisten(305));
            this.add(RanklistBtn);
            // 藏宝阁
            CBGBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB3h.png", 1, UIUtils.COLOR_BTNTEXT, "", 78);
            CBGBtn.setBounds(2 + 22 * 2, 45, 20, 20);
            CBGBtn.addMouseListener(new WLLMouslisten(306));
            this.add(CBGBtn);

            //活动日历
            hdrlBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB4h.png", 1, UIUtils.COLOR_BTNTEXT, "", 40);
            hdrlBtn.setBounds(2 + 22 * 3, 45, 35, 20);
            hdrlBtn.addMouseListener(new WLLMouslisten(307));
            this.add(hdrlBtn);

//        //全民竞猜
//        cpBtn = new FormsOnOffBtn("skin/8100226/button/2竞猜.png", 1, UIUtils.COLOR_BTNTEXT, "", 1105);
//        cpBtn.setBounds(78, 35, 34, 18);
//        if(configure.getQmjckg().equals("开")) {
//            this.add(cpBtn);
//        }


            //左上角小地图图标
            mapiconBtn = new FormsOnOffBtn("skin/8100226/newbutton/B61h.png", 1, 22);
            mapiconBtn.setBounds(182, 23, 20, 20);
            mapiconBtn.addMouseListener(new WLLMouslisten(302));
            this.add(mapiconBtn);
            //左上角世界地图图标
            worldMap = new FormsOnOffBtn("skin/8100226/newbutton/B62h.png", 1, 1102);
            worldMap.setBounds(182, 3, 20, 20);
            worldMap.addMouseListener(new WLLMouslisten(303));
            this.add(worldMap);

            //飞行器
            this.aircraftBtns = new AircraftBtn[2];
            for (int i = 0; i < this.aircraftBtns.length; ++i) {
                this.aircraftBtns[i] = new AircraftBtn("inkImg/hongmu/2/btnCommon102.png", 1, i == 0 ? "坐骑" : "飞行器", UIUtils.TEXT_FONT, UIUtils.COLOR_RED_BTNTEXT, i + 10, this);
                this.aircraftBtns[i].setBounds(ScrenceUntil.Screen_x - 181, ScrenceUntil.Screen_y - (67 - i * 17), 102, 17);
                this.aircraftBtns[i].setVisible(false);
                this.add(this.aircraftBtns[i]);
            }
            this.btnzuoqi = new AircraftBtn("skin/8100226/newbutton/syajh.png", 1, "坐  骑", UIUtils.TEXT_HY16s, UIUtils.COLOR_WHITE3, 10, this);
            this.btnzuoqi.setBounds(ScrenceUntil.Screen_x - 302, ScrenceUntil.Screen_y - 67, 117, 24);
            this.btnzuoqi.addMouseListener(new WLLMouslisten(212));
            this.btnzuoqi.setVisible(false);
            this.add(this.btnzuoqi);
            btnfeixingqi = new AircraftBtn("skin/8100226/newbutton/syajh.png", 1, "飞  行", UIUtils.TEXT_HY16s, UIUtils.COLOR_WHITE3, 11, this);
            this.btnfeixingqi.setBounds(ScrenceUntil.Screen_x - 302, ScrenceUntil.Screen_y - 50, 117, 24);
            this.btnfeixingqi.addMouseListener(new WLLMouslisten(213));
            this.btnfeixingqi.setVisible(false);
            this.add(this.btnfeixingqi);

            paltBtn = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "退出游戏", 20);
            this.paltBtn.setVisible(false);
            this.add(this.paltBtn);

            testSetupJpanel = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "游戏设置", 200);
            this.testSetupJpanel.setVisible(false);
            this.add(this.testSetupJpanel);

            lainOpenWeb = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "联系客服", 201);
            this.lainOpenWeb.setVisible(false);
            this.add(this.lainOpenWeb);

            szCbg = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "藏宝阁", 202);
            this.szCbg.setVisible(false);
            this.add(this.szCbg);

            viplblq = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "VIP礼包", 199);
            this.viplblq.setVisible(false);
            this.add(this.viplblq);

            jyxyjs = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "全民竞猜", 1098);
            this.jyxyjs.setVisible(false);
            this.add(this.jyxyjs);

//            xyjys = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "协议及隐私", 195);
//            this.xyjys.setVisible(false);
//            this.add(this.xyjys);

            zdlh = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "自动炼化", 196);
            this.zdlh.setVisible(false);
            this.add(this.zdlh);

            vipActive = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "自动任务", 197);
            this.vipActive.setVisible(false);
            this.add(this.vipActive);

            transactionBtn = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "交  易", 203);
            this.transactionBtn.setVisible(false);
            this.add(this.transactionBtn);

            getBtn = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "给  予", 204);
            this.getBtn.setVisible(false);
            this.add(this.getBtn);

            //新手引导
            guideBtn = new FormsOnOffBtn("skin/8100226/newbutton/ttIco.png", 1, 604);
            guideBtn.setBounds(20, 78, 53, 53);
            this.add(guideBtn);

            //充值礼包
            czlbBtn = new FormsOnOffBtn("skin/8100226/button/gift-btn.png", 1, 3002);//CHA
            czlbBtn.setBounds(140, 78, 0, 0);
            if ("开".equals(configure.getLbzxkg())) {
                this.add(czlbBtn);
            }

            //冲等礼包
            this.chongjiBtn = new VipShopBtn("skin/8100226/newbutton/SS70.png", 1, 50);
//            chongjiBtn.addMouseListener(new WLLMouslisten(8));
            this.chongjiBtn.setBounds(79, 80, 53, 53);
            if ("开".equals(configure.getLbzxkg())) {
                this.add(this.chongjiBtn);
            }
            //激情泡点
            pdBtn = new FormsOnOffBtn("skin/8100226/button/pd.png", 1, 3003);//CHA
            if ("开".equals(configure.getPdgnkg())) {
                this.add(pdBtn);
            }
            // 快捷操作
            kuaijieBtn = new FormsOnOffBtn("inkImg/button/B420.png", 1, 3100);//CHA
            kuaijieBtn.setBounds(145, 80, 53, 53);
            this.add(kuaijieBtn);

            //        //签到 fei119
            this.QianDaoMenu = new FormsOnOffBtn("inkImg/newbutton/qiandao.png", 1, UIUtils.COLOR_BTNTEXT, "签", 1100);
            this.QianDaoMenu.setBounds(144 +64, 80, 53, 53);;
            if ("开".equals(configure.getQmjckg())) {
                this.add(QianDaoMenu);
            }

            labbackground = new JLabel();
            labbackground.setIcon(new ImageIcon("inkImg/hongmu/S30h.png"));
            labbackground.setBounds(0, 0, 201, 67);
            this.add(labbackground);

            ltldt = new JLabel();
            ltldt.setIcon(new ImageIcon("inkImg/old/1/chatjpanel_ltck.png"));
            this.add(ltldt);


            ShopingMenu = new JLabel();
            ShopingMenu.setBounds(205, 5, 35, 35);
            // 打开商城
            ShopingMenu.addMouseListener(new OnlineShopingOpenShopMouslisten());
            ShopingMenu.addMouseListener(new WLLMouslisten(300));
            this.add(ShopingMenu);
            // 设置抽奖按钮
            if ("开".equals(configure.getCjgnkg())) {
                DrawMenu = new JLabel();
                DrawMenu.setBounds(205 + 40, 5, 35, 35);
                DrawMenu.addMouseListener(new WLLMouslisten(308));
                // 打开抽奖
                DrawMenu.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mousePressed(MouseEvent e) {
                        // TODO Auto-generated method stub
                        LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getlotteryTypeGoods(1);
                        FormsManagement.showForm(87);
                    }
                });
                this.add(DrawMenu);
            }
            this.setBackground(UIUtils.Color_BACK);
            this.btnOperation = new TeamPanelBtn("skin/8100226/newbutton/syajh.png", 1, "组队操作", UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, this);
            this.btnOperation.setBounds(ScrenceUntil.Screen_x - 291, ScrenceUntil.Screen_y - 67, 117, 24);
            this.btnOperation.setVisible(false);
            this.add(this.btnOperation);
            this.btnPlatform = new TeamPanelBtn("skin/8100226/newbutton/syajh.png", 1, "组队平台", UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, this);
            this.btnPlatform.setBounds(ScrenceUntil.Screen_x - 291, ScrenceUntil.Screen_y - 50, 117, 24);
            this.btnPlatform.setVisible(false);
            this.add(this.btnPlatform);

            this.taskGuideView = new TaskGuideView();
            this.add(this.taskGuideView);


            this.kjsfBtn = new JLabel();
            this.kjsfBtn.setIcon(new ImageIcon("inkImg/hongmu/2/快捷_w250.png"));
            this.kjsfBtn.setBounds(ScrenceUntil.Screen_x - 338, ScrenceUntil.Screen_y - 38, 338, 38);
//      this.add(this.kjsfBtn);

//左上角扩展快捷
            this.caidan = new VipShopBtn("skin/8100226/newbutton/sjajgbh.png", 1, 56);
            caidan.addMouseListener(new WLLMouslisten(7));
            this.add(this.caidan);


            ImageIcon hotKeyBackImg = new ImageIcon("inkImg/hongmu/xbbkjlh.png");
            hotKeyMethod(hotKeyBackImg);
        }

        //开始时间
        startTime = new JLabel();
        startTime.setBounds(15, 5, 180, 20);
        startTime.setForeground(Color.YELLOW);

        //持续时间
        durationTime = new JLabel();
        durationTime.setBounds(15, 5, 180, 20);
        durationTime.setForeground(Color.YELLOW);

        //获得经验
        obtainExp = new JLabel();
        obtainExp.setBounds(15, 5, 180, 20);
        obtainExp.setForeground(Color.YELLOW);

        //花费金钱
        spendSilver = new JLabel();
        spendSilver.setBounds(15, 5, 180, 20);
        spendSilver.setForeground(Color.YELLOW);

        //花费仙玉
        spendxy = new JLabel();
        spendxy.setBounds(15, 5, 180, 20);
        spendxy.setForeground(Color.YELLOW);

        //胜利场次
        win = new JLabel();
        win.setBounds(15, 5, 180, 20);
        win.setForeground(Color.YELLOW);

        //标题
        mexp = new JLabel();
        mexp.setBounds(15, 5, 180, 20);
        mexp.setForeground(Color.YELLOW);
        //背景
        pdexp = new JLabel();
        pdexp.setIcon(new ImageIcon("inkImg/old/background/泡点背景.png"));
        pdexp.setBounds(0, 0, 205, 147);

        //仙玉泡点 退出
        this.tcpdBtn = new FightingBtn("inkImg/old/background/paodian-tc-btn.png", 1, UIUtils.COLOR_BTNPUTONG, UIUtils.TEXT_HY88, "", 30034);
        this.tcpdBtn.setBounds(468, 615, 69, 26);
        this.add(this.tcpdBtn);
    }
    public static FormsOnOffBtn getKuaijieBtn() {
        return kuaijieBtn;
    }

    // 商城图标
    static Sprite Mall;
    // 抽奖图标
    static Sprite Draw;

    static {
        Mall = SpriteFactory.VloadSprite("resource/mouse/商城.tcp", null);
        Draw = SpriteFactory.VloadSprite("resource/mouse/奖.tcp", null);
        if (Draw == null) {
            Draw = Mall;
        }
    }
    // 泡点
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        Mall.updateToTime(ImageMixDeal.userimg.getTime(), 0);
        Mall.draw(g, 210, 5);
        if ("开".equals(cjkg)) {
            Draw.updateToTime(ImageMixDeal.userimg.getTime(), 0);
            Draw.draw(g, 210 + 40, 5);
        }

        if (this.cjkg.equals("开"));
        this.chehui.setBounds(ScrenceUntil.Screen_x - 29, 264, 26, 26);
        if (FightingMixDeal.State == 2 || FightingMixDeal.State == 1 || FightingMixDeal.State == 3) {
            Graphics2D g2d = (Graphics2D)g;
            Color color = new Color(32, 38, 32, 200);
            Color color1 = new Color(52, 61, 52, 0);
            GradientPaint gradient = new GradientPaint(0.0F, 0.0F, color, 0.0F, (getHeight() - 1), color1);
            g2d.setPaint(gradient);
            g2d.fillRoundRect(ScrenceUntil.Screen_x - 29, 290, 23, 100, 0, 0);
            g2d.fillRoundRect(ScrenceUntil.Screen_x - 29, 290, 23, 100, 0, 0);
            g2d.setColor(Color.white);
            g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
            g2d.setFont(UIUtils.TEXT_HY19);
            g2d.drawString("撤", ScrenceUntil.Screen_x - 26, 305);
            g2d.drawString("撤", ScrenceUntil.Screen_x - 26, 305);
            g2d.drawString("回", ScrenceUntil.Screen_x - 26, 331);
            g2d.drawString("回", ScrenceUntil.Screen_x - 26, 331);
        }
        if (Util.ifpf) {
            mexp.setText("泡点信息");
            mexp.setFont(UIUtils.TEXT_FONTZS);
            startTime.setText("开始时间：" + Util.startTimeName);
            durationTime.setText("泡点时长：" + getPdTime());
            obtainExp.setText("获得经验：" + Util.hdzjy);
            spendSilver.setText("消费金钱：" + Util.xfzje);
            spendxy.setText("消费仙玉：" + Util.xfzxy);
            win.setText("胜利场次：" + (Util.xfzxy - 1));
            if (ScrenceUntil.Screen_x == 1366 && ScrenceUntil.Screen_y == 768) {
                startTime.setBounds(585, 530, 180, 20);
                durationTime.setBounds(585, 550, 180, 20);
                obtainExp.setBounds(585, 570, 180, 20);
                spendSilver.setBounds(585, 590, 180, 20);
                win.setBounds(585, 590, 180, 20);
                spendxy.setBounds(585, 590, 180, 20);
                mexp.setBounds(648, 505, 180, 20);//标题
                pdexp.setBounds(580, 500, 205, 147);//背景
                this.tcpdBtn.setBounds(648, 615, 69, 26);
            } else if (ScrenceUntil.Screen_x == 1024 && ScrenceUntil.Screen_y == 768) {
                startTime.setBounds(432, 470, 180, 20);
                durationTime.setBounds(432, 490, 180, 20);
                obtainExp.setBounds(432, 510, 180, 20);
                spendSilver.setBounds(432, 530, 180, 20);
                win.setBounds(432, 530, 180, 20);
                spendxy.setBounds(432, 530, 180, 20);
                mexp.setBounds(492, 450, 180, 20);//标题
                pdexp.setBounds(432, 450, 205, 147);//背景
                this.tcpdBtn.setBounds(492, 565, 69, 26);
            } else if (ScrenceUntil.Screen_x == 1920 && ScrenceUntil.Screen_y == 1080) {
                startTime.setBounds(862, 780, 180, 20);
                durationTime.setBounds(862, 800, 180, 20);
                obtainExp.setBounds(862, 820, 180, 20);
                spendSilver.setBounds(862, 840, 180, 20);
                win.setBounds(862, 840, 180, 20);
                spendxy.setBounds(862, 840, 180, 20);
                mexp.setBounds(925, 755, 180, 20);//标题
                pdexp.setBounds(857, 750, 205, 147);//背景
                this.tcpdBtn.setBounds(925, 865, 69, 26);
            } else if (ScrenceUntil.Screen_x == 800 && ScrenceUntil.Screen_y == 600) {
                startTime.setBounds(320, 420, 180, 20);
                durationTime.setBounds(320, 440, 180, 20);
                obtainExp.setBounds(320, 460, 180, 20);
                spendSilver.setBounds(320, 480, 180, 20);
                win.setBounds(320, 480, 180, 20);
                spendxy.setBounds(320, 480, 180, 20);
                mexp.setBounds(380, 400, 180, 20);//标题
                pdexp.setBounds(310, 400, 205, 147);//背景
                this.tcpdBtn.setBounds(380, 515, 69, 26);
            }
            this.add(startTime);
            this.add(durationTime);
            this.add(obtainExp);
            if ("2".equals(Util.pdtype)) {
                this.add(spendSilver);
                this.remove(this.spendxy);
            } else if ("3".equals(Util.pdtype)) {
                this.add(spendxy);
                this.remove(this.spendSilver);
            } else if ("1".equals(Util.pdtype)) {
                this.remove(this.spendSilver);
                this.remove(this.spendxy);
            }
            this.add(mexp);
            this.add(pdexp);
        } else {
            this.remove(this.startTime);
            this.remove(this.durationTime);
            this.remove(this.obtainExp);
            this.remove(this.spendSilver);
            this.remove(this.spendxy);
            this.remove(this.win);
            this.remove(this.mexp);
            this.remove(this.pdexp);
            this.tcpdBtn.setBounds(9968, 9615, 69, 26);
        }
    }

    public String getPdTime() {
        String timeName = "00:00:00";
        //开始时间
        Long s = Util.startTime;
        //当前时间
        Long d = new Date().getTime();
        Long c = d - s;
        timeName = Util.formatTime(c);
        return timeName;
    }
    /**
     * 按钮位置切换
     */
    public void BtnChange() {
        if ("水墨UI".equals(MyIsif.getStyle())) {

            zidong.setBounds(ScrenceUntil.Screen_x - 59, ScrenceUntil.Screen_y - 160, 59, 24);
            fashu.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550, 59, 24);
            daoju.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 1, 59, 24);
            fangyu.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 2, 59, 24);
            baohu.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 3, 59, 24);
            zhaohuan1.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 4, 59, 24);
            zhaohui.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 5, 59, 24);
            buzhua.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 6, 59, 24);
            taopao.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 7, 59, 24);
            chehui.setBounds(ScrenceUntil.Screen_x - 30, 368, 26, 26);
            zidong111.setBounds(ScrenceUntil.Screen_x - 60, ScrenceUntil.Screen_y - 195, 60, 25);

            labnotice.setBounds(0, ScrenceUntil.Screen_y - 161, 70, 25);
            labworld.setBounds(0, ScrenceUntil.Screen_y - 134, 70, 25);
            labbangs.setBounds(0, ScrenceUntil.Screen_y - 107, 70, 25);
            labgroups.setBounds(0, ScrenceUntil.Screen_y - 80, 70, 25);
            labnow.setBounds(0, ScrenceUntil.Screen_y - 53, 70, 25);

            SendMes.setBounds(55, ScrenceUntil.Screen_y - 26, ScrenceUntil.SendMsg_x + 60, 25);
            jLabelLeftMes.setBounds(0, ScrenceUntil.Screen_y - 43, 160, 43);
//            jLabelSendMes.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x + 10, 43);

            caidan.setBounds(0, 78, 13, 53);
            guideBtn.setBounds(20, 78, 53, 53);

            Dbiaoqing.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 12 - 10), ScrenceUntil.Screen_y - 32, 22, 36);
            lowerRightImgBack.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 11), ScrenceUntil.Screen_y - 39, 468, 39);

            bjczBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 11), ScrenceUntil.Screen_y - 39, 39, 39);
            childBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 10), ScrenceUntil.Screen_y - 39, 39, 39);
            knapsackBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 9), ScrenceUntil.Screen_y - 39, 39, 39);
            groupBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 8), ScrenceUntil.Screen_y - 39, 39, 39);
            pkBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 7), ScrenceUntil.Screen_y - 39, 39, 39);
            transactionBtn1.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 6), ScrenceUntil.Screen_y - 39, 39, 39);
            rwjnBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 5), ScrenceUntil.Screen_y - 39, 39, 39);
            petBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 4), ScrenceUntil.Screen_y - 39, 39, 39);
            taskBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 3), ScrenceUntil.Screen_y - 39, 39, 39);
            friendsBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 2), ScrenceUntil.Screen_y - 39, 39, 39);
            gangBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 1), ScrenceUntil.Screen_y - 39, 39, 39);
            systemBtn.setBounds(ScrenceUntil.Screen_x - 39, ScrenceUntil.Screen_y - 39, 39, 39);

            btnOperation.setBounds(ScrenceUntil.Screen_x - 390, ScrenceUntil.Screen_y - (63 + 24 * 1), 117, 24);
            btnPlatform.setBounds(ScrenceUntil.Screen_x - 390, ScrenceUntil.Screen_y - 63, 117, 24);

            btnzuoqi.setBounds(ScrenceUntil.Screen_x - 233, ScrenceUntil.Screen_y - (63 + 24 * 1), 117, 24);
            btnfeixingqi.setBounds(ScrenceUntil.Screen_x - 233, ScrenceUntil.Screen_y - 63, 117, 24);

            paltBtn.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - 63, 117, 24);
            testSetupJpanel.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 1), 117, 24);
            lainOpenWeb.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 2), 117, 24);
            szCbg.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 3), 117, 24);
            viplblq.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 4), 117, 24);
            jyxyjs.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 5), 117, 24);
            zdlh.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 6), 117, 24);
            vipActive.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 7), 117, 24);
//            xyjys.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 8), 117, 24);

            getBtn.setBounds(ScrenceUntil.Screen_x - 311, ScrenceUntil.Screen_y - 63, 117, 24);
            transactionBtn.setBounds(ScrenceUntil.Screen_x - 311, ScrenceUntil.Screen_y - (63 + 24 * 1), 117, 24);

            petlehead.setBounds(ScrenceUntil.Screen_x - (178 + 136), 0, 136, 58);
            labpetimg.setBounds(ScrenceUntil.Screen_x - 309, 5, 48, 48);
            bbexe.setBounds(ScrenceUntil.Screen_x - 253, 1 + 6, 72, 12);
            bbhp.setBounds(ScrenceUntil.Screen_x - 253, 13 + 9, 72, 12);
            bbmp.setBounds(ScrenceUntil.Screen_x - 253, 25 + 12, 72, 12);

            labroleimg.setBounds(ScrenceUntil.Screen_x - 171, 8, 58, 58);
            roleexe.setBounds(ScrenceUntil.Screen_x - 104, 1 + 7, 100, 14);
            rolehp.setBounds(ScrenceUntil.Screen_x - 104, 17 + 8, 100, 14);
            rolemp.setBounds(ScrenceUntil.Screen_x - 104, 33 + 9, 100, 14);
            labrolehead.setBounds(ScrenceUntil.Screen_x - 178, 1, 178, 72);

            dangqian.setBounds(6, ScrenceUntil.Screen_y - 26, 51, 25);
        } else {
            zidong.setBounds(ScrenceUntil.Screen_x - 60, ScrenceUntil.Screen_y - 160, 60, 25);
            fashu.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550, 60, 25);
            daoju.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 1, 60, 25);
            fangyu.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 2, 60, 25);
            baohu.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 3, 60, 25);
            zhaohuan1.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 4, 60, 25);
            zhaohui.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 5, 60, 25);
            buzhua.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 6, 60, 25);
            taopao.setBounds(ScrenceUntil.Screen_x - 90, ScrenceUntil.Screen_y - 550 + 25 * 7, 60, 25);
            chehui.setBounds(ScrenceUntil.Screen_x - 30, 368, 26, 26);
            zidong111.setBounds(ScrenceUntil.Screen_x - 60, ScrenceUntil.Screen_y - 195, 60, 25);

            labnotice.setBounds(0, ScrenceUntil.Screen_y - 161, 70, 25);
            labworld.setBounds(0, ScrenceUntil.Screen_y - 134, 70, 25);
            labbangs.setBounds(0, ScrenceUntil.Screen_y - 107, 70, 25);
            labgroups.setBounds(0, ScrenceUntil.Screen_y - 80, 70, 25);
            labnow.setBounds(0, ScrenceUntil.Screen_y - 53, 70, 25);

            SendMes.setBounds(55, ScrenceUntil.Screen_y - 26, ScrenceUntil.SendMsg_x + 60, 25);
            jLabelLeftMes.setBounds(0, ScrenceUntil.Screen_y - 26, 160, 25);

//            jLabelSendMes.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x + 10, 43);

            caidan.setBounds(0, 78, 12, 53);
            guideBtn.setBounds(20, 78, 53, 53);
            Dbiaoqing.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 12 - 10), ScrenceUntil.Screen_y - 32, 22, 36);
            lowerRightImgBack.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 11), ScrenceUntil.Screen_y - 39, 468, 39);
            bjczBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 11), ScrenceUntil.Screen_y - 39, 39, 39);
            childBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 10), ScrenceUntil.Screen_y - 39, 39, 39);
            knapsackBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 9), ScrenceUntil.Screen_y - 39, 39, 39);
            groupBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 8), ScrenceUntil.Screen_y - 39, 39, 39);
            pkBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 7), ScrenceUntil.Screen_y - 39, 39, 39);
            transactionBtn1.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 6), ScrenceUntil.Screen_y - 39, 39, 39);
            rwjnBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 5), ScrenceUntil.Screen_y - 39, 39, 39);
            petBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 4), ScrenceUntil.Screen_y - 39, 39, 39);
            taskBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 3), ScrenceUntil.Screen_y - 39, 39, 39);
            friendsBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 2), ScrenceUntil.Screen_y - 39, 39, 39);
            gangBtn.setBounds(ScrenceUntil.Screen_x - (39 + 39 * 1), ScrenceUntil.Screen_y - 39, 39, 39);
            systemBtn.setBounds(ScrenceUntil.Screen_x - 39, ScrenceUntil.Screen_y - 39, 39, 39);
            btnOperation.setBounds(ScrenceUntil.Screen_x - 390, ScrenceUntil.Screen_y - (63 + 24 * 1), 117, 24);
            btnPlatform.setBounds(ScrenceUntil.Screen_x - 390, ScrenceUntil.Screen_y - 63, 117, 24);
            btnzuoqi.setBounds(ScrenceUntil.Screen_x - 233, ScrenceUntil.Screen_y - (63 + 24 * 1), 117, 24);
            btnfeixingqi.setBounds(ScrenceUntil.Screen_x - 233, ScrenceUntil.Screen_y - 63, 117, 24);
            paltBtn.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - 63, 117, 24);
            testSetupJpanel.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 1), 117, 24);
            lainOpenWeb.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 2), 117, 24);
            szCbg.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 3), 117, 24);
            viplblq.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 4), 117, 24);
            jyxyjs.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 5), 117, 24);
            zdlh.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 6), 117, 24);
            vipActive.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 7), 117, 24);
//            xyjys.setBounds(ScrenceUntil.Screen_x - 117, ScrenceUntil.Screen_y - (63 + 24 * 8), 117, 24);
            getBtn.setBounds(ScrenceUntil.Screen_x - 311, ScrenceUntil.Screen_y - 63, 117, 24);
            transactionBtn.setBounds(ScrenceUntil.Screen_x - 311, ScrenceUntil.Screen_y - (63 + 24 * 1), 117, 24);

            petlehead.setBounds(ScrenceUntil.Screen_x - (178 + 136), 0, 136, 58);
            labpetimg.setBounds(ScrenceUntil.Screen_x - 309, 5, 48, 48);
            bbexe.setBounds(ScrenceUntil.Screen_x - 253, 1 + 6, 72, 12);
            bbhp.setBounds(ScrenceUntil.Screen_x - 253, 13 + 9, 72, 12);
            bbmp.setBounds(ScrenceUntil.Screen_x - 253, 25 + 12, 72, 12);

            labroleimg.setBounds(ScrenceUntil.Screen_x - 171, 8, 58, 58);
            roleexe.setBounds(ScrenceUntil.Screen_x - 104, 1 + 7, 100, 14);
            rolehp.setBounds(ScrenceUntil.Screen_x - 104, 17 + 8, 100, 14);
            rolemp.setBounds(ScrenceUntil.Screen_x - 104, 33 + 9, 100, 14);
            labrolehead.setBounds(ScrenceUntil.Screen_x - 178, 1, 178, 72);

            dangqian.setBounds(6, ScrenceUntil.Screen_y - 26, 51, 25);
        }

        if ("水墨UI".equals(MyIsif.getStyle())) {
            if (ScrenceUntil.Screen_x == 800) {
                jLabelLeftMes1.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x, 43);
            } else if (ScrenceUntil.Screen_x == 1024) {
                jLabelLeftMes1.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x, 43);
            } else if (ScrenceUntil.Screen_x == 1366) {
                jLabelLeftMes1.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x, 43);
            } else {
                jLabelLeftMes1.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x, 43);
            }
        } else {
            if (ScrenceUntil.Screen_x == 800) {
                jLabelLeftMes1.setBounds(160, ScrenceUntil.Screen_y - 26, ScrenceUntil.SendMsg_x, 25);
            } else if (ScrenceUntil.Screen_x == 1024) {
                jLabelLeftMes1.setBounds(160, ScrenceUntil.Screen_y - 26, ScrenceUntil.SendMsg_x, 25);
            } else if (ScrenceUntil.Screen_x == 1366) {
                jLabelLeftMes1.setBounds(160, ScrenceUntil.Screen_y - 26, ScrenceUntil.SendMsg_x, 25);
            } else {
                jLabelLeftMes1.setBounds(160, ScrenceUntil.Screen_y - 26, 140, 25);
            }
        }
        this.hotKeyBack.setBounds(ScrenceUntil.Screen_x - 321, ScrenceUntil.Screen_y - 81, 321, 41);
        hotKey.setBounds(ScrenceUntil.Screen_x - 333, ScrenceUntil.Screen_y - 79, 12, 37);
    }
    /**
     * 物品描述显示传物品图片路径 物品名 物品描述 显示的位置
     */
    public void creatgoodtext(Object object) {
        GoodsMsgJframe goodsMsgJframe = GoodsMsgJframe.getGoodsMsgJframe();
        int height = 0;
        if (object instanceof Goodstable) {
            height = goodsMsgJframe.getGoodsMsgJpanel().showGood((Goodstable) object);
        } else if (object instanceof Shop) {
            height = goodsMsgJframe.getGoodsMsgJpanel().showShop((Shop) object);
        } else if (object instanceof Eshop) {
            height = goodsMsgJframe.getGoodsMsgJpanel().showEshop((Eshop) object);
        } else if (object instanceof PayvipBean) {
            height = goodsMsgJframe.getGoodsMsgJpanel().showPayvipBean((PayvipBean) object);
        } else if (object instanceof RoleTxBean) {
            height = goodsMsgJframe.getGoodsMsgJpanel().showRoleTxBean((RoleTxBean) object);
        }
        Point goodx = framepoint(GameJpanel.getGameJpanel().getMousePosition(), goodsMsgJframe.getSize());
        goodsMsgJframe.setBounds((int) goodx.getX(), (int) goodx.getY(), 500, height);
        FormsManagement.showForm(24);
    }

    public void creatlingtext(Lingbao lingbao) {
        Point goodx = this.framepoint(GameJpanel.getGameJpanel().getMousePosition(), LingMsgJframe.getLingMsgJpanel().getSize());
        LingMsgJframe.getLingMsgJpanel().setBounds((int) goodx.getX(), (int) goodx.getY(), LingMsgJframe.getLingMsgJpanel().getWidth(), LingMsgJframe.getLingMsgJpanel().getHeight());
        LingMsgJframe.getLingMsgJpanel().getJpanel().lingbaoshow(lingbao);
        FormsManagement.showForm(45);
    }
    public void updatePetText(RoleSummoning roleSummoning) {
        if (roleSummoning == null || roleSummoning.equals(currentPetDisplayed)) {
            return; // 如果相同就不再刷新
        }

        PetsMsgJframe petsMsgJframe = PetsMsgJframe.getPetsMsgJframe();
        petsMsgJframe.setSize(400, petsMsgJframe.getPetsMsgJpanel().petMsg(roleSummoning, null));
    }
    public void creatpettext(RoleSummoning roleSummoning) {
        PetsMsgJframe petsMsgJframe = PetsMsgJframe.getPetsMsgJframe();
        petsMsgJframe.setSize(400, petsMsgJframe.getPetsMsgJpanel().petMsg(roleSummoning, null));
        Point goodx = this.framepoint(GameJpanel.getGameJpanel().getMousePosition(), petsMsgJframe.getSize());
        petsMsgJframe.setBounds((int)goodx.getX(), (int)goodx.getY(), 500, petsMsgJframe.getPetsMsgJpanel().getGheight());
        FormsManagement.showForm(42);
    }

    public void creatroletext(BigDecimal id, String name) {
        Point goodx = this.framepoint(GameJpanel.getGameJpanel().getMousePosition(), RoleMsgJframe.getRoleMsgJframe().getSize());
        RoleMsgJframe.getRoleMsgJframe().getJpanel().show(id, name);
        RoleMsgJframe.getRoleMsgJframe().setBounds(0, 134, 160, 185);
        FormsManagement.showForm(77);
    }

    public void creatgoodtext2(Goodstable goodstable) {
        int height = GoodsMsgJframe.getGoodsMsgJframe().getGoodsMsgJpanel().showGood(goodstable);
        Point goodx = this.framepoint(null, GoodsMsgJframe.getGoodsMsgJframe().getSize());
        GoodsMsgJframe.getGoodsMsgJframe().setBounds((int) goodx.getX(), (int) goodx.getY(), 500, height);
        FormsManagement.showForm(24);
    }


    public void creatlingtext2(Lingbao lingbao) {
        Point goodx = this.framepoint(null, LingMsgJframe.getLingMsgJpanel().getSize());
        LingMsgJframe.getLingMsgJpanel().setBounds((int) goodx.getX(), (int) goodx.getY(), LingMsgJframe.getLingMsgJpanel().getWidth(), LingMsgJframe.getLingMsgJpanel().getHeight());
        LingMsgJframe.getLingMsgJpanel().getJpanel().lingbaoshow(lingbao);
        FormsManagement.showForm(45);
    }

    public void creatpettext2(RoleSummoning roleSummoning) {
        PetsMsgJframe petsMsgJframe = PetsMsgJframe.getPetsMsgJframe();
        petsMsgJframe.setSize(400, petsMsgJframe.getPetsMsgJpanel().petMsg(roleSummoning, null));
        Point goodx = this.framepoint(null, petsMsgJframe.getSize());
        petsMsgJframe.setBounds((int) goodx.getX(), (int) goodx.getY(), 500, petsMsgJframe.getPetsMsgJpanel().getGheight());
        FormsManagement.showForm(42);
    }

    public void cleargoodtext() {
        FormsManagement.HideForm(24);
    }

    public void clearlingtext() {
        FormsManagement.HideForm(45);
    }

    public void pettext() {
        FormsManagement.HideForm(42);
    }

    /**
     * 根据鼠标的位置的窗体大小给于显示位置
     */
    public Point framepoint(Point mouse, Dimension dimension) {
        int fw = TestMain.gameJframe.getWidth();
        int fh = TestMain.gameJframe.getHeight();
        if (mouse == null) {
            mouse = GameJpanel.getGameJpanel().getMousePosition();
            Point point = new Point((int) ((fw - dimension.getWidth()) / 2.0D),
                    (int) ((fh - dimension.getHeight()) / 2.0D));
            if (mouse != null && (point.getX() > mouse.getX() || point.getY() > mouse.getY()
                    || point.getX() + dimension.getWidth() < mouse.getX()
                    || point.getY() + dimension.getHeight() < mouse.getY())) {
                return point;
            }
        }
        if(mouse == null){
            return new Point( 10,  10);
        }
        if (mouse.getX() + dimension.getWidth() + 10.0D <= fw && mouse.getY() + dimension.getHeight() + 10.0D <= fh) {
            return new Point((int) mouse.getX() + 10, (int) mouse.getY() + 10);
        }
        if (mouse.getX() + dimension.getWidth() + 10.0D <= fw && mouse.getY() - dimension.getHeight() - 10.0D > 0.0D) {
            return new Point((int) mouse.getX() + 10, (int) mouse.getY() - (int) dimension.getHeight() - 10);
        }
        if (mouse.getX() - dimension.getWidth() - 10.0D > 0.0D && mouse.getY() - dimension.getHeight() - 10.0D > 0.0D) {
            return new Point((int) mouse.getX() - (int) dimension.getWidth() - 10,
                    (int) mouse.getY() - (int) dimension.getHeight() - 10);
        }
        if (mouse.getX() - dimension.getWidth() - 10.0D > 0.0D && mouse.getY() + dimension.getHeight() + 10.0D <= fh) {
            return new Point((int) mouse.getX() - (int) dimension.getWidth() - 10, (int) mouse.getY() + 10);
        }
        if (mouse.getX() + dimension.getWidth() + 10.0D <= fw) {
            return new Point((int) mouse.getX() + 10, (int) mouse.getY() - fh / 2 + 10);
        }
        return new Point((int) mouse.getX() - (int) dimension.getWidth() - 10, (int) mouse.getY() - fh / 2 + 10);
    }

    //抽奖 /*
    @Override
    public void paint(Graphics g) {

        tcp.updateToTime(ImageMixDeal.userimg.getTime(), 0);
        tcp1.updateToTime(ImageMixDeal.userimg.getTime(), 0);
        super.paint(g);
        tcp.draw(g, 210, 5);
        //抽奖
        if (cjkg != null) {
            if ("开".equals(cjkg)) {
                tcp1.draw(g, 210 + 40, 5);
            }
        }
        if (styles) {
            styles = false;
            ssx();
        }
    }

    public void addPrompt(String text) {
        GameJpanel.getGameJpanel().addPrompt("#Y" + text);
    }

    public void addPrompt2(String text) {
        GameJpanel.getGameJpanel().addPrompt("#Y" + text);
        FrameMessageChangeJpanel.addtext(6, text, null, null);
    }

    ImageIcon s600SM = new ImageIcon("skin/8100226/newbutton/s602.png");

    ImageIcon s600HM = new ImageIcon("skin/8100226/newbutton/s602h.png");

    public void SXTeam(RoleShow roleShow, TeamBean teamBean) {
        if (teamBean == null) {
            int i;
            if (this.teamHeads != null) {
                for (i = 0; i < this.teamHeads.length; ++i) {
                    if (this.teamHeads[i] != null) {
                        this.teamHeads[i].setVisible(false);
                    }
                }
            }

            if (this.teamOperations != null) {
                for (i = 0; i < this.teamOperations.length; ++i) {
                    if (this.teamOperations[i] != null) {
                        this.teamOperations[i].setVisible(false);
                    }
                }
            }

        } else {
            boolean isCaptian = teamBean.getTeams().get(0).getRoleId().compareTo(roleShow.getRole_id()) == 0;
            int i = 0;

            for (int length = teamBean.getTeams().size(); i < 5; ++i) {
                TeamRole teamRole = i < length ? teamBean.getTeams().get(i) : null;
                if (teamRole == null) {
                    if (this.teamHeads != null && this.teamHeads[i] != null) {
                        this.teamHeads[i].setVisible(false);
                    }

                    if (this.teamOperations != null && i != 0 && this.teamOperations[i - 1] != null) {
                        this.teamOperations[i - 1].setVisible(false);
                    }

                    return;
                }

                if (this.teamHeads == null) {
                    this.teamHeads = new JLabel[5];
                }


                if (this.teamHeads[i] == null) {
                    this.teamHeads[i] = new JLabel() {
                        @Override
                        protected void paintComponent(Graphics g) {
                            if ("水墨UI".equals(MyIsif.getStyle())) {
                                ZhuJpanel.this.icon = s600SM;
                            }else{
                                ZhuJpanel.this.icon = s600HM;
                            }

                            g.drawImage(ZhuJpanel.this.icon.getImage(), 0, 0, null);
                            g.translate(6, 0);
                            super.paintComponent(g);
                            g.translate(-6, 0);
                        }
                    };
                    this.teamHeads[i].setBounds(ScrenceUntil.TeamImg_x + 70 + i * 52, 0, 52, 52);
                    this.add(this.teamHeads[i]);
                }

                this.teamHeads[i].setIcon(CutButtonImage.getImage("img/head/s" + teamRole.getSpeciesId() + ".png", 40, 40));
                this.teamHeads[i].setVisible(true);
                if (i != 0) {
                    String text = null;
                    if (isCaptian && teamRole.getState() < 0) {
                        text = "召";
                    } else if (teamRole.getRoleId().compareTo(roleShow.getRole_id()) == 0) {
                        text = teamRole.getState() >= 0 ? "离" : "归";
                    }

                    if (text != null) {
                        if (this.teamOperations == null) {
                            this.teamOperations = new TeamPanelBtn[4];
                        }

                        if (this.teamOperations[i - 1] == null) {
                            this.teamOperations[i - 1] = new TeamPanelBtn("skin/8100226/button/19.png", 1, i, UIUtils.COLOR_BTNTEXT, UIUtils.TEXT_FONT);
                            this.teamOperations[i - 1].setBounds(ScrenceUntil.TeamImg_x + 70 + i * 70, 54, 18, 18);
                            this.add(this.teamOperations[i - 1], 0);
                        }

                        if ("水墨UI".equals(MyIsif.getStyle())) {
                            this.teamOperations[i - 1].setIcon(s600SM);
                        }else{
                            this.teamOperations[i - 1].setIcon(s600HM);
                        }

                        this.teamOperations[i - 1].setText(text);
                        this.teamOperations[i - 1].setVisible(true);
                    } else if (this.teamOperations != null && this.teamOperations[i - 1] != null) {
                        this.teamOperations[i - 1].setVisible(false);
                    }
                    if(this.teamOperations != null && this.teamOperations[i - 1] != null){

                        this.teamOperations[i - 1].setBounds(ScrenceUntil.TeamImg_x + 70 + i * 70, 54, 18, 18);
                    }
                }
            }

        }
    }

    public void fightingbtn() {
        if ("水墨UI".equals(MyIsif.getStyle())) {

            zidong = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "自动", 0);
            fashu = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "法术", 1);
            daoju = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "道具", 2);
            fangyu = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "防御", 3);
            baohu = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "保护", 4);
            zhaohuan1 = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "召唤", 55);
            zhaohui = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "召回", 6);
            buzhua = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "捕抓", 7);
            taopao = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "逃跑", 8);
            zidong111 = new FightingBtn("skin/8100226/newbutton/aj1.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_HY16a, "认输", 9);
            chehui = new FightingBtn("inkImg/button/zdchs.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_FONT21, "", 11);
        } else {
            zidong = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "自动", 0);
            fashu = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "法术", 1);
            daoju = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "道具", 2);
            fangyu = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "防御", 3);
            baohu = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "保护", 4);
            zhaohuan1 = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "召唤", 55);
            zhaohui = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "召回", 6);
            buzhua = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "捕抓", 7);
            taopao = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "逃跑", 8);
            zidong111 = new FightingBtn("inkImg/hongmu/1/6026.png", 1, UIUtils.COLOR_BTNPUTONG1, UIUtils.TEXT_HY88, "认输", 9);
            chehui = new FightingBtn("inkImg/hongmu/zdch.png", 1, UIUtils.COLOR_BLACK, UIUtils.TEXT_FONT21, "", 11);
        }
    }

    public void ShowManBtn(boolean is) {
        FightingMonitor.mousestate = 0;
        this.add(this.zidong111);
        this.add(this.fashu);
        this.add(this.daoju);
        this.add(this.fangyu);
        this.add(this.baohu);
        this.add(this.zhaohuan1);
        this.add(this.zhaohui);
        this.add(this.buzhua);
        this.add(this.taopao);
        this.add(this.chehui);
        try {
            if ("水墨UI".equals(MyIsif.getStyle())) {
                if (is) {
                    if (this.fashu.getBtn() != -1) {
                        this.fashu.setIcon(CutButtonImage.getImage("skin/8100226/newbutton/aj1h.png", -1, -1));
                        this.fashu.setBtn(-1);
                    }
                    if (this.daoju.getBtn() != -1) {
                        this.daoju.setIcon(CutButtonImage.getImage("skin/8100226/newbutton/aj1h.png", -1, -1));
                        this.daoju.setBtn(-1);
                    }
                    if (this.baohu.getBtn() != -1) {
                        this.baohu.setIcon(CutButtonImage.getImage("skin/8100226/newbutton/aj1h.png", -1, -1));
                        this.baohu.setBtn(-1);
                    }
                    if (this.zhaohui.getBtn() != -1) {
                        this.zhaohui.setIcon(CutButtonImage.getImage("skin/8100226/newbutton/aj1h.png", -1, -1));
                        this.zhaohui.setBtn(-1);
                    }
                    if (this.buzhua.getBtn() != -1) {
                        this.buzhua.setIcon(CutButtonImage.getImage("skin/8100226/newbutton/aj1h.png", -1, -1));
                        this.buzhua.setBtn(-1);
                    }
                } else {
                    if (this.fashu.getBtn() != 1) {
                        this.fashu.setIcons(CutButtonImage.cuts("skin/8100226/newbutton/aj1.png"));
                        this.fashu.setBtn(1);
                    }
                    if (this.daoju.getBtn() != 1) {
                        this.daoju.setIcons(CutButtonImage.cuts("skin/8100226/newbutton/aj1.png"));
                        this.daoju.setBtn(1);
                    }
                    if (this.baohu.getBtn() != 1) {
                        this.baohu.setIcons(CutButtonImage.cuts("skin/8100226/newbutton/aj1.png"));
                        this.baohu.setBtn(1);
                    }
                    if (this.zhaohui.getBtn() != 1) {
                        this.zhaohui.setIcons(CutButtonImage.cuts("skin/8100226/newbutton/aj1.png"));
                        this.zhaohui.setBtn(1);
                    }
                    if (this.buzhua.getBtn() != 1) {
                        this.buzhua.setIcons(CutButtonImage.cuts("skin/8100226/newbutton/aj1.png"));
                        this.buzhua.setBtn(1);
                    }
                }
            } else {
                if (is) {
                    if (this.fashu.getBtn() != -1) {
                        this.fashu.setIcon(CutButtonImage.getImage("inkImg/hongmu/1/6061.png", -1, -1));
                        this.fashu.setBtn(-1);
                    }
                    if (this.daoju.getBtn() != -1) {
                        this.daoju.setIcon(CutButtonImage.getImage("inkImg/hongmu/1/6061.png", -1, -1));
                        this.daoju.setBtn(-1);
                    }
                    if (this.baohu.getBtn() != -1) {
                        this.baohu.setIcon(CutButtonImage.getImage("inkImg/hongmu/1/6061.png", -1, -1));
                        this.baohu.setBtn(-1);
                    }
                    if (this.zhaohui.getBtn() != -1) {
                        this.zhaohui.setIcon(CutButtonImage.getImage("inkImg/hongmu/1/6061.png", -1, -1));
                        this.zhaohui.setBtn(-1);
                    }
                    if (this.buzhua.getBtn() != -1) {
                        this.buzhua.setIcon(CutButtonImage.getImage("inkImg/hongmu/1/6061.png", -1, -1));
                        this.buzhua.setBtn(-1);
                    }
                } else {
                    if (this.fashu.getBtn() != 1) {
                        this.fashu.setIcons(CutButtonImage.cuts("inkImg/hongmu/1/6026.png"));
                        this.fashu.setBtn(1);
                    }
                    if (this.daoju.getBtn() != 1) {
                        this.daoju.setIcons(CutButtonImage.cuts("inkImg/hongmu/1/6026.png"));
                        this.daoju.setBtn(1);
                    }
                    if (this.baohu.getBtn() != 1) {
                        this.baohu.setIcons(CutButtonImage.cuts("inkImg/hongmu/1/6026.png"));
                        this.baohu.setBtn(1);
                    }
                    if (this.zhaohui.getBtn() != 1) {
                        this.zhaohui.setIcons(CutButtonImage.cuts("inkImg/hongmu/1/6026.png"));
                        this.zhaohui.setBtn(1);
                    }
                    if (this.buzhua.getBtn() != 1) {
                        this.buzhua.setIcons(CutButtonImage.cuts("inkImg/hongmu/1/6026.png"));
                        this.buzhua.setBtn(1);
                    }
                }
            }
        } catch (Exception var3) {
            var3.printStackTrace();
        }
    }

    public void HideBeastBtn() {
        this.add(this.zidong111);
        this.remove(this.fashu);
        this.remove(this.daoju);
        this.remove(this.fangyu);
        this.remove(this.baohu);
        this.remove(this.zhaohuan1);
        this.remove(this.zhaohui);
        this.remove(this.buzhua);
        this.remove(this.taopao);
//        this.remove(this.chehui);
    }
    public void ShowBeastBtn() {
        FightingMonitor.mousestate = 0;
        this.add(this.fashu);
        this.add(this.daoju);
        this.add(this.fangyu);
        this.add(this.baohu);

        try {
            if ("水墨UI".equals(MyIsif.getStyle())) {

                if (this.fashu.getBtn() != 1) {
                    this.fashu.setIcons(CutButtonImage.cuts("skin/8100226/newbutton/aj1.png"));
                    this.fashu.setBtn(1);
                }
                if (this.daoju.getBtn() != 1) {
                    this.daoju.setIcons(CutButtonImage.cuts("skin/8100226/newbutton/aj1.png"));
                    this.daoju.setBtn(1);
                }
                if (this.baohu.getBtn() != 1) {
                    this.baohu.setIcons(CutButtonImage.cuts("skin/8100226/newbutton/aj1.png"));
                    this.baohu.setBtn(1);
                }
            } else {

                if (this.fashu.getBtn() != 1) {
                    this.fashu.setIcons(CutButtonImage.cuts("inkImg/hongmu/1/6026.png"));
                    this.fashu.setBtn(1);
                }
                if (this.daoju.getBtn() != 1) {
                    this.daoju.setIcons(CutButtonImage.cuts("inkImg/hongmu/1/6026.png"));
                    this.daoju.setBtn(1);
                }
                if (this.baohu.getBtn() != 1) {
                    this.baohu.setIcons(CutButtonImage.cuts("inkImg/hongmu/1/6026.png"));
                    this.baohu.setBtn(1);
                }
            }
        } catch (Exception var2) {
            var2.printStackTrace();
        }
    }

    public void outForms() {
        lableft.setBounds(12, ScrenceUntil.Screen_y - 46, 17, 17);
        labbottom.setBounds(12 + 25, ScrenceUntil.Screen_y - 46, 17, 17);
        labtop.setBounds(12 + 25 * 2, ScrenceUntil.Screen_y - 46, 17, 17);
        labstar.setBounds(12 + 25 * 3, ScrenceUntil.Screen_y - 46, 18, 18);
        labadd.setBounds(12 + 25 * 4, ScrenceUntil.Screen_y - 46, 17, 17);
        labminus.setBounds(12 + 25 * 5, ScrenceUntil.Screen_y - 46, 17, 17);
        ltldt.setBounds(0, ScrenceUntil.Screen_y - 46, 288, 17);
        //聊天窗口内嵌显示
        lableft.setVisible(true);
        labbottom.setVisible(true);
        labtop.setVisible(true);
        labstar.setVisible(true);
        labadd.setVisible(true);
        labminus.setVisible(true);
        ltldt.setVisible(true);
        //聊天窗口内嵌显示
    }

    public void intoForms() {
        //聊天窗口按键默认不显示
        lableft.setVisible(false);
        labbottom.setVisible(false);
        labtop.setVisible(false);
        labstar.setVisible(false);
        labadd.setVisible(false);
        labminus.setVisible(false);
        ltldt.setVisible(false);
        //聊天窗口按键默认不显示
    }

    //非战斗显示和不显示
    public void outFighting() {
        //非战斗显示队伍
        if (teamHeads != null) {
            for (int i = 0; i < teamHeads.length; i++) {
                if (teamHeads[i] != null) {
                    teamHeads[i].setBounds(ScrenceUntil.TeamImg_x + i * 52 + 70, 0, 52, 52);
                }
            }
        }
        for (int i = 0; i < this.aircraftBtns.length; ++i) {
            this.aircraftBtns[i].setBounds(ScrenceUntil.Screen_x - 181, ScrenceUntil.Screen_y - (64 - i * 17), 102, 17);
        }

        if (teamOperations != null) {
            for (int i = 0; i < teamOperations.length; i++) {
                if (teamOperations[i] != null) {
                    teamOperations[i].setBounds(ScrenceUntil.TeamImg_x + 122 + i * 52, 34, 18, 18);
                }
            }
        }

        FightingMonitor.mousestate = 0;
        this.remove(this.zidong111);
        this.remove(this.zidong);
        this.remove(this.fashu);
        this.remove(this.daoju);
        this.remove(this.fangyu);
        this.remove(this.baohu);
        this.remove(this.zhaohuan1);
        this.remove(this.zhaohui);
        this.remove(this.buzhua);
        this.remove(this.chehui);
        this.remove(this.taopao);

        final TesttaskJapnel task = TesttaskJframe.getTesttaskJframe().getJtask();
        if (task.getCaozuo() == 1) {
            this.taskGuideView.setVisible(false);
        } else {
            if (this.taskGuideView.isV()) {
                this.taskGuideView.setVisible(this.taskGuideView.isV());
            }
        }

        CBGBtn.setVisible(true);
        hdrlBtn.setVisible(true);
        TJBtn.setVisible(true);
        mapiconBtn.setVisible(true);
        worldMap.setVisible(true);
        chongjiBtn.setVisible(true);
        caidan.setVisible(true);

        knapsackBtn.setVisible(true);
        groupBtn.setVisible(true);
        pkBtn.setVisible(true);
        transactionBtn1.setVisible(true);
        taskBtn.setVisible(true);
        lowerRightImgBack.setVisible(false);

        pdBtn.setVisible(true);
        kuaijieBtn.setVisible(true);
        guideBtn.setVisible(true);
        czlbBtn.setVisible(true);
        MapName.setVisible(true);
        xAndY.setVisible(true);
        QianDaoMenu.setVisible(true);
        if(rechargeBtn != null){
            rechargeBtn.setVisible(true);
        }
        Timemiao.setVisible(true);
        RanklistBtn.setVisible(true);
        ShopingMenu.setVisible(true);
        if ("开".equals(configure.getCjgnkg())) {
            DrawMenu.setVisible(true);
        }
        labbackground.setVisible(true);
        labpetimg.setVisible(true);
        petlehead.setVisible(true);
        labpetimg.setBounds(ScrenceUntil.Screen_x - 309, 5, 48, 48);
        petlehead.setBounds(ScrenceUntil.Screen_x - (178 + 136), 0, 136, 58);//召唤兽头像固定坐标
        bbexe.setBounds(ScrenceUntil.Screen_x - 253, 1 + 6, 72, 12);
        bbhp.setBounds(ScrenceUntil.Screen_x - 253, 13 + 9, 72, 12);
        bbmp.setBounds(ScrenceUntil.Screen_x - 253, 25 + 12, 72, 12);
    }

    //战斗显示和不显示
    public void intoFighting() {
        //战斗不显示队伍
        if (teamHeads != null) {
            for (int i = 0; i < teamHeads.length; i++) {
                if (teamHeads[i] != null) {
                    teamHeads[i].setBounds(ScrenceUntil.TeamImg_x + i * 52 + 70, 0, 0, 0);
                }
            }
        }
        for (int i = 0; i < this.aircraftBtns.length; ++i) {
            this.aircraftBtns[i].setBounds(ScrenceUntil.Screen_x - 181, ScrenceUntil.Screen_y - (64 - i * 17), 102, 17);
        }
        if (teamOperations != null) {
            for (int i = 0; i < teamOperations.length; i++) {
                if (teamOperations[i] != null) {
                    teamOperations[i].setBounds(ScrenceUntil.TeamImg_x + 122 + i * 52, 34, 0, 0);
                }
            }
        }
        /**
         * 退出战斗
         */
        FightingMonitor.mousestate = 0;
        this.remove(this.zidong111);
        this.remove(this.zidong);
        this.remove(this.fashu);
        this.remove(this.daoju);
        this.remove(this.fangyu);
        this.remove(this.baohu);
        this.remove(this.zhaohuan1);
        this.remove(this.zhaohui);
        this.remove(this.buzhua);
        this.remove(this.taopao);
        this.remove(this.chehui);

        //TODO 退出战斗显示任务追踪窗口
        if (this.taskGuideView.isV()) {
            this.taskGuideView.setVisible(false);//小图标不正常召唤兽位置不对
        }

        CBGBtn.setVisible(false);
        hdrlBtn.setVisible(false);
        TJBtn.setVisible(false);
        mapiconBtn.setVisible(false);
        worldMap.setVisible(false);
        chongjiBtn.setVisible(false);
        caidan.setVisible(false);

        ShopingMenu.setVisible(true);//商城
        if ("开".equals(configure.getCjgnkg())) {
            DrawMenu.setVisible(true);//抽奖
        }
        RanklistBtn.setVisible(false);//排行榜
        knapsackBtn.setVisible(false);
        groupBtn.setVisible(false);
        pkBtn.setVisible(false);
        transactionBtn1.setVisible(false);
        taskBtn.setVisible(false);
        lowerRightImgBack.setVisible(true);
        pdBtn.setVisible(false);
        guideBtn.setVisible(false);
        czlbBtn.setVisible(false);
        MapName.setVisible(false);
        xAndY.setVisible(false);
        kuaijieBtn.setVisible(false);
        QianDaoMenu.setVisible(false);
        if(rechargeBtn != null){
            rechargeBtn.setVisible(false);
        }
        Timemiao.setVisible(false);
        labbackground.setVisible(false);
        labpetimg.setVisible(true);
        petlehead.setVisible(true);
        labpetimg.setBounds(4, 5, 48, 48);
        petlehead.setBounds(0, 0, 136, 58);//召唤兽头像固定坐标
        bbexe.setBounds(60, 1 + 6, 72, 12);
        bbhp.setBounds(60, 13 + 9, 72, 12);
        bbmp.setBounds(60, 25 + 12, 72, 12);
    }

    public void showIsTeamBtn(boolean type, int num) {
        if (num == 0) {
            this.btnOperation.setVisible(type);
            this.btnPlatform.setVisible(type);
        } else if (this.btnOperation.isVisible()) {
            this.btnOperation.setVisible(false);
            this.btnPlatform.setVisible(false);
        } else {
            this.btnOperation.setVisible(true);
            this.btnPlatform.setVisible(true);
        }
    }

    public FightingBtn getChehui() {
        return this.chehui;
    }

    /**
     * ======================时间显示实例===============================
     */
    public static JLabel getTimemiao() {
        return Timemiao;
    }
    /**
     * ======================时间显示实例===============================
     */
    public JLabel getDangqian() {
        return this.dangqian;
    }

    public JLabel getLabnow() {
        return this.labnow;
    }

    public JLabel getLabgroups() {
        return this.labgroups;
    }

    public JLabel getLabbangs() {
        return this.labbangs;
    }

    public JLabel getLabworld() {
        return this.labworld;
    }


    public JTextField getSendMes() {
        return this.SendMes;
    }

    public void setSendMes(JTextField sendMes) {
        this.SendMes = sendMes;
    }

    public int getCaozuo() {
        return this.caozuo;
    }

    public void setCaozuo(final int caozuo) {
        this.caozuo = caozuo;
    }

    public static void setLabpetimg(String path) {
        if (path == null) {
            ImageIcon icon1 = CutButtonImage.getImage("inkImg/old/2/S155x.png", -1, -1);
            labpetimg.setIcon(icon1);
        } else {
            File file = new File(path);
            ImageIcon icon1;
            if (file.exists()) {
                icon1 = CutButtonImage.getImage(path, 50, 50);
                labpetimg.setIcon(icon1);
            } else {
                icon1 = CutButtonImage.getImage("inkImg/hongmu/2/101_png.xy2uiimg.pet_def.png", -1, -1);

                labpetimg.setIcon(icon1);
            }
        }
    }

    public static JLabel getLabroleimg() {
        return labroleimg;
    }

    public ChoseDangQianMounslisten getChoseDangQianMounslisten() {
        return this.choseDangQianMounslisten;
    }


    public int getTeamState() {
        return this.TeamState;
    }

    public void setTeamState(int teamState) {
        this.TeamState = teamState;
    }

    public FightingBtn getZidong() {
        return this.zidong;
    }

    public void setZidong(FightingBtn zidong) {
        this.zidong = zidong;
    }

    public FightingBtn getZidong111() {
        return this.zidong111;
    }

    public FightingBtn setZidong111() {
        return this.zidong111;
    }

    public static List<Mount> getListMount() {
        return listMount;
    }

    public static void setListMount(List<Mount> listMount) {
        ZhuJpanel.listMount = listMount;
    }

    public static Mount getPetMount(BigDecimal petId) {
        if (listMount != null) {
            for (int i = 0; i < listMount.size(); i++) {
                Mount mount = listMount.get(i);
                if (mount.getSid() != null && mount.getSid().compareTo(petId) == 0) {
                    return mount;
                }

                if (mount.getOthrersid() != null && mount.getOthrersid().compareTo(petId) == 0) {
                    return mount;
                }
                if (mount.getSid4() != null && mount.getSid4().compareTo(petId) == 0) {
                    return mount;
                }
                if (mount.getSid5() != null && mount.getSid5().compareTo(petId) == 0) {
                    return mount;
                }
                if (mount.getSid3() != null && mount.getSid3().compareTo(petId) == 0) {
                    return mount;
                }
            }
        }

        return null;
    }

    public static Goodstable getGoodstableAl() {
        return goodstableAl;
    }

    public static void setGoodstableAl(Goodstable goodstableAl) {
        ZhuJpanel.goodstableAl = goodstableAl;
    }

    public JLabel getRolehp() {
        return this.rolehp;
    }

    public void setRolehp(JLabel rolehp) {
        this.rolehp = rolehp;
    }

    public JLabel getRolemp() {
        return this.rolemp;
    }

    public void setRolemp(JLabel rolemp) {
        this.rolemp = rolemp;
    }

    public JLabel getRoleexe() {
        return this.roleexe;
    }

    public void setRoleexe(JLabel roleexe) {
        this.roleexe = roleexe;
    }

    public JLabel getBbhp() {
        return this.bbhp;
    }

    public void setBbhp(JLabel bbhp) {
        this.bbhp = bbhp;
    }

    public JLabel getBbmp() {
        return this.bbmp;
    }

    public void setBbmp(JLabel bbmp) {
        this.bbmp = bbmp;
    }

    public JLabel getBbexe() {
        return this.bbexe;
    }

    public void setBbexe(JLabel bbexe) {
        this.bbexe = bbexe;
    }

    public static int getUseGoodsType() {
        return UseGoodsType;
    }

    public static void setUseGoodsType(int useGoodsType) {
        UseGoodsType = useGoodsType;
    }

    public static Goodstable getNedangoods() {
        return Nedangoods;
    }

    public static void setNedangoods(Goodstable nedangoods) {
        Nedangoods = nedangoods;
    }

    public JLabel getjLabelSendMes() {
        return this.jLabelSendMes;
    }

    public void setjLabelSendMes(JLabel jLabelSendMes) {
        this.jLabelSendMes = jLabelSendMes;
    }

    public static FormsOnOffBtn getKnapsackBtn() {
        return knapsackBtn;
    }

    public static void setKnapsackBtn(FormsOnOffBtn knapsackBtn) {
        ZhuJpanel.knapsackBtn = knapsackBtn;
    }

    public static MouseStyleBtn getGroupBtn() {
        return groupBtn;
    }

    public static void setGroupBtn(MouseStyleBtn groupBtn) {
        ZhuJpanel.groupBtn = groupBtn;
    }

    public static FormsOnOffBtn getFriendsBtn() {
        return friendsBtn;
    }

    public static void setFriendsBtn(FormsOnOffBtn friendsBtn) {
        ZhuJpanel.friendsBtn = friendsBtn;
    }


    public static FormsOnOffBtn getfuzhu() {
        return fuzhu;
    }

    public static void setfuzhu(FormsOnOffBtn fuzhu) {
        ZhuJpanel.fuzhu = fuzhu;
    }

    public static FormsOnOffBtn getQianDaoMenu() {
        return QianDaoMenu;
    }

    public static void setQianDaoMenu(FormsOnOffBtn QianDaoMenu) {
        ZhuJpanel.QianDaoMenu = QianDaoMenu;
    }


    public static FormsOnOffBtn getTJBtn() {
        return TJBtn;
    }

    public static void setTJBtn(FormsOnOffBtn TJBtn) {

        ZhuJpanel.TJBtn = TJBtn;
    }

    public static FormsOnOffBtn getGangBtn() {
        return gangBtn;
    }

    public static void setGangBtn(FormsOnOffBtn gangBtn) {
        ZhuJpanel.gangBtn = gangBtn;
    }

    public static SmallIconBtn getLabbottom() {
        return labbottom;
    }

    public static void setLabbottom(SmallIconBtn labbottom) {
        ZhuJpanel.labbottom = labbottom;
    }

    public static SmallIconBtn getLabtop() {
        return labtop;
    }

    public static void setLabtop(SmallIconBtn labtop) {
        ZhuJpanel.labtop = labtop;
    }

    public static SmallIconBtn getLabstar() {
        return labstar;
    }

    public static void setLabstar(SmallIconBtn labstar) {
        ZhuJpanel.labstar = labstar;
    }

    public static SmallIconBtn getLabadd() {
        return labadd;
    }

    public static void setLabadd(SmallIconBtn labadd) {
        ZhuJpanel.labadd = labadd;
    }

    public static SmallIconBtn getLabminus() {
        return labminus;
    }

    public static void setLabminus(SmallIconBtn labminus) {
        ZhuJpanel.labminus = labminus;
    }

    public static JLabel getxAndY() {
        return xAndY;
    }

    public static void setxAndY(JLabel xAndY) {
        ZhuJpanel.xAndY = xAndY;
    }

    public JLabel getLabnotice() {
        return this.labnotice;
    }

    public void setLabnotice(JLabel labnotice) {
        this.labnotice = labnotice;
    }

    public static FormsOnOffBtn getRechargeBtn() {
        return rechargeBtn;
    }

    public void setRechargeBtn(FormsOnOffBtn rechargeBtn) {
        rechargeBtn = rechargeBtn;
    }

    public VipShopBtn getOddsBtn() {
        return this.oddsBtn;
    }

    public void setOddsBtn(VipShopBtn oddsBtn) {
        this.oddsBtn = oddsBtn;
    }

    public VipShopBtn getShowVipBtn() {
        return this.showVipBtn;
    }

    public void setShowVipBtn(VipShopBtn showVipBtn) {
        this.showVipBtn = showVipBtn;
    }

    public VipShopBtn getcaidan() {
        return this.caidan;
    }

    public void setcaidan(VipShopBtn caidan) {
        this.caidan = caidan;
    }

    public VipShopBtn getShowcaidan1() {
        return this.showcaidan1;
    }

    public void setShowcaidan1(VipShopBtn showcaidan1) {
        this.showcaidan1 = showcaidan1;
    }


    public TaskGuideView getTaskGuideView() {
        return this.taskGuideView;
    }


    public TeamPanelBtn getBtnOperation() {
        return this.btnOperation;
    }

    public void setBtnOperation(TeamPanelBtn btnOperation) {
        this.btnOperation = btnOperation;
    }

    public TeamPanelBtn getBtnPlatform() {
        return this.btnPlatform;
    }

    public void setBtnPlatform(TeamPanelBtn btnPlatform) {
        this.btnPlatform = btnPlatform;
    }

    public List<VipShopBtn> getBtnListVicon() {
        return this.btnListVicon;
    }

    public void setBtnListVicon(List<VipShopBtn> btnListVicon) {
        this.btnListVicon = btnListVicon;
    }

    public VipShopBtn getchongjiBtn() {
        return this.chongjiBtn;
    }

    public void setchongjiBtn(VipShopBtn chongjiBtn) {
        this.chongjiBtn = chongjiBtn;
    }

    public VipShopBtn getcontinuousBtn() {
        return this.continuousBtn;
    }

    public void setcontinuousBtn(VipShopBtn continuousBtn) {
        this.continuousBtn = continuousBtn;
    }

    public JLabel getShopingMenu() {
        return this.ShopingMenu;
    }

    public void setShopingMenu(JLabel shopingMenu) {
        this.ShopingMenu = shopingMenu;
    }

    public JLabel getDrawMenu() {
        return this.DrawMenu;
    }

    public void setDrawMenu(JLabel drawMenu) {
        this.DrawMenu = drawMenu;
    }

    public VipShopBtn getrecharge() {
        return recharge;
    }

    public void setrecharge(VipShopBtn recharge) {
        ZhuJpanel.recharge = recharge;
    }

    public Date getUptime() {
        return uptime;
    }

    public void setUptime(Date uptime) {
        this.uptime = uptime;
    }

    public AircraftBtn[] getAircraftBtns() {
        return this.aircraftBtns;
    }

    public void setAircraftBtns(AircraftBtn[] aircraftBtns) {
        this.aircraftBtns = aircraftBtns;
    }

    public static FormsOnOffBtn getPdBtn() {
        return pdBtn;
    }


    public static void setPdBtn(FormsOnOffBtn pdBtn) {
        ZhuJpanel.pdBtn = pdBtn;
    }


    public static FormsOnOffBtn getBjczBtn() {
        return bjczBtn;
    }


    public static FormsOnOffBtn getGuideBtn() {
        return guideBtn;
    }


    public static void setGuideBtn(FormsOnOffBtn guideBtn) {
        ZhuJpanel.guideBtn = guideBtn;
    }


    public static FormsOnOffBtn getCzlbBtn() {
        return czlbBtn;
    }


    public static void setCzlbBtn(FormsOnOffBtn czlbBtn) {
        ZhuJpanel.czlbBtn = czlbBtn;
    }


    public static void setBjczBtn(FormsOnOffBtn bjczBtn) {
        ZhuJpanel.bjczBtn = bjczBtn;
    }


    public int getMounState() {
        return mounState;
    }


    public void setMounState(int mounState) {
        this.mounState = mounState;
    }



    /**
     * 鼠标进入
     *
     * @param e
     */
    public void mouseEntered(MouseEvent e) {
        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
    }

    /**
     * 鼠标离开
     *
     * @param e
     */
    public void mouseExited(MouseEvent e) {
        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
    }

    //飞行器
    public static List<Fly> getListFly() {
        return ListFly;
    }

    private static void setListFly(List<Fly> ListFly) {
        ZhuJpanel.ListFly = ListFly;
    }

    public void showflybtn(boolean type, int num) {
        if (num == 0) {
            this.btnzuoqi.setVisible(type);//
            this.btnfeixingqi.setVisible(type);
        } else if (this.btnzuoqi.isVisible()) {
            this.btnzuoqi.setVisible(false);
            this.btnfeixingqi.setVisible(false);
        } else {
            this.btnzuoqi.setVisible(true);
            this.btnfeixingqi.setVisible(true);
        }

    }

    //设置菜单
    public void settingsMenu(boolean type, int num) {
        if (num == 0) {
            this.paltBtn.setVisible(type);
            this.testSetupJpanel.setVisible(type);//
            this.lainOpenWeb.setVisible(type);
            this.szCbg.setVisible(type);
            this.viplblq.setVisible(type);
            this.jyxyjs.setVisible(type);
//            this.xyjys.setVisible(type);
            this.zdlh.setVisible(type);
            this.vipActive.setVisible(type);
        } else if (this.testSetupJpanel.isVisible()) {
            this.paltBtn.setVisible(false);
            this.testSetupJpanel.setVisible(false);
            this.lainOpenWeb.setVisible(false);
            this.szCbg.setVisible(false);
            this.viplblq.setVisible(false);
            this.jyxyjs.setVisible(false);
//            this.xyjys.setVisible(false);
            this.zdlh.setVisible(false);
            this.vipActive.setVisible(false);
        } else {
            this.paltBtn.setVisible(true);
            this.testSetupJpanel.setVisible(true);
            this.lainOpenWeb.setVisible(true);
            this.szCbg.setVisible(true);
            this.viplblq.setVisible(true);
            this.jyxyjs.setVisible(true);
//            this.xyjys.setVisible(true);
            this.zdlh.setVisible(true);
            this.vipActive.setVisible(true);
        }

    }

    //交易菜单
    public void tradingMenu(boolean type, int num) {
        if (num == 0) {
            this.getBtn.setVisible(type);
            this.transactionBtn.setVisible(type);//
        } else if (this.transactionBtn.isVisible()) {
            this.getBtn.setVisible(false);
            this.transactionBtn.setVisible(false);
        } else {
            this.getBtn.setVisible(true);
            this.transactionBtn.setVisible(true);
        }

    }

    /*快捷栏显示*/
    /*修复快捷键切换分辨率不显示BUG开始*/
    JLabel[] choseGoodsJLabel = new JLabel[8];
    JLabel[] hotKeyGoodsListLabel = new JLabel[8];
    JLabel[] hotKeyGoodsListLabelFID = new JLabel[8];// 增加高亮F1-F8的显示

    HotKeyMouseListen[] goodsMouslistens = new HotKeyMouseListen[8];

    public void hideHotKey() {
        this.hotKeyBack.setVisible(false);
        int Flag = 0;
        int count = 1;
        for (int j = 0; j < 8; ++j) {
            this.hotKeyGoodsListLabelFID[j].setVisible(false);
            this.hotKeyGoodsListLabel[j].setVisible(false);
            int row = j % 8 * 40;
            int col = j / 8 * 40;
            this.hotKeyGoodsListLabelFID[j].setBounds((ScrenceUntil.Screen_x - 326) + (row + 8), (ScrenceUntil.Screen_y - 85) + (col + 4), 41, 41);
            this.hotKeyGoodsListLabel[j].setBounds((ScrenceUntil.Screen_x - 326) + (row + 8), (ScrenceUntil.Screen_y - 85) + (col + 4), 41, 41);
        }

    }

    public void showHotKey() {
        this.hotKeyBack.setVisible(true);
        int Flag = 0;
        int count = 1;
        for (int j = 0; j < 8; ++j) {
            this.hotKeyGoodsListLabelFID[j].setVisible(true);
            this.hotKeyGoodsListLabel[j].setVisible(true);
            int row = j % 8 * 40;
            int col = j / 8 * 40;
            this.hotKeyGoodsListLabelFID[j].setBounds((ScrenceUntil.Screen_x - 326) + (row + 8), (ScrenceUntil.Screen_y - 85) + (col + 4), 41, 41);
            this.hotKeyGoodsListLabel[j].setBounds((ScrenceUntil.Screen_x - 326) + (row + 8), (ScrenceUntil.Screen_y - 85) + (col + 4), 41, 41);

        }

    }
    /*修复快捷键切换分辨率不显示BUG开始结束*/

    /*界面快捷键*/
    public void hotKeyMethod(ImageIcon hotKeyBackImg) {
        this.choseGoodsJLabel = new JLabel[8];
        this.hotKeyGoodsListLabel = new JLabel[8];
        this.hotKeyGoodsListLabelFID = new JLabel[8];
        this.goodsMouslistens = new HotKeyMouseListen[8];
        int Flag = 0;
        int count = 1;
        for (int j = 0; j < 8; ++j) {
            int row = j % 8 * 40;
            int col = j / 8 * 40;
            this.hotKeyGoodsListLabelFID[j] = new JLabel();
            this.hotKeyGoodsListLabel[j] = new JLabel();
            String name = "hot_" + String.valueOf(j);
            String value = HotKeyMouseListen.keyMap.get(name);
            if (StrUtil.isNotBlank(value)) {
                boolean number = NumberUtil.isNumber(value);
                if (number) {
                    int chaxuns = GoodsListFromServerUntil.chaxuns(Integer.parseInt(value));

                    if (chaxuns != -1) {
                        Goodstable goodstable = GoodsListFromServerUntil.Getgood(chaxuns);
                        if (goodstable != null) {
                            this.hotKeyGoodsListLabelFID[j].setIcon(new ImageIcon(new ImageIcon("inkImg/number/npk/k/F" + j + ".png").getImage().getScaledInstance(
                                    35, 35, 1)));
                            this.hotKeyGoodsListLabel[j].setIcon(new ImageIcon(new ImageIcon("img/item/" + goodstable.getSkin() + ".png").getImage().getScaledInstance(
                                    35, 35, 1)));
                        }

                    }
                } else {
                    String s = value.split("_")[1];
                    Skill skill = UserMessUntil.getSkillById(s);
                    if (skill != null) {
                        this.hotKeyGoodsListLabelFID[j].setIcon(
                                new ImageIcon(new ImageIcon("inkImg/number/npk/k/F" + j + ".png").getImage().getScaledInstance(
                                        35, 35, 10)));
                        this.hotKeyGoodsListLabel[j].setIcon(
                                new ImageIcon(new ImageIcon("inkImg/old/skill/fighting-skill/" + skill.getSkillid() + ".png").getImage().getScaledInstance(
                                        35, 35, 10)));
                    }
                }

                this.hotKeyGoodsListLabelFID[j].setVisible(true);
                this.hotKeyGoodsListLabel[j].setVisible(true);

            }
            this.hotKeyGoodsListLabel[j].setName(name);
            this.goodsMouslistens[j] = new HotKeyMouseListen(j, this);
            this.hotKeyGoodsListLabel[j].addMouseListener((MouseListener) this.goodsMouslistens[j]);

            if (Flag < 8 && count == 1) {
//    修复快捷键切换分辨率不显示BUG开始
                this.hotKeyGoodsListLabelFID[j].setBounds((ScrenceUntil.Screen_x - 326) + (row + 8), (ScrenceUntil.Screen_y - 85) + (col + 4), 41, 41);
                this.hotKeyGoodsListLabel[j].setBounds((ScrenceUntil.Screen_x - 326) + (row + 8), (ScrenceUntil.Screen_y - 85) + (col + 4), 41, 41);
//    修复快捷键切换分辨率不显示BUG开始结束
                ++Flag;
                this.add(this.hotKeyGoodsListLabelFID[j]);
                this.add(this.hotKeyGoodsListLabel[j]);
            } else if (Flag == 8) {
                Flag = 0;
                ++count;
            }
        }


        this.hotKeyBack = new JLabel();
        this.hotKeyBack.setIcon(hotKeyBackImg);
        this.hotKeyBack.setBounds(ScrenceUntil.Screen_x - 321, ScrenceUntil.Screen_y - 81, 321, 41);
        this.hotKeyBack.setForeground(Color.WHITE);
        this.hotKeyBack.setHorizontalTextPosition(0);
        this.hotKeyBack.setFont(UIUtils.TEXT_FONT);
        this.hotKeyBack.setVisible(true);
        this.add(this.hotKeyBack);
        if ("水墨UI".equals(MyIsif.getStyle())) {
            this.hotKey = new FormsOnOffBtn("skin/8100226/newbutton/kjlsxaj.png", 1, 888);
        } else {
            this.hotKey = new FormsOnOffBtn("skin/8100226/newbutton/kjlsxajh.png", 1, 888);
        }
        hotKey.addMouseListener(new WLLMouslisten(7));
        hotKey.setBounds(ScrenceUntil.Screen_x - 333, ScrenceUntil.Screen_y - 79, 12, 37);
        this.add(hotKey);
    }

    public void hotKeyImg() {
        try {
            String roleId = ImageMixDeal.userimg.getRoleShow().getRole_id().toString();
            String s = Util.readHotkey(roleId);
            if (s == null) {
                return;
            }
            JSON parse = JSONUtil.parse(s);
            Map hashMap = parse.toBean(Map.class);
            HotKeyMouseListen.keyMap = hashMap;
            //system.out.println(hashMap);

            int Flag = 0;
            int count = 1;
            for (int j = 0; j < 8; ++j) {
                int row = j % 8 * 40;
                int col = j / 8 * 40;
                String name = "hot_" + String.valueOf(j);
                String value = HotKeyMouseListen.keyMap.get(name);
                boolean number = NumberUtil.isNumber(value);
                if (number) {
                    int chaxuns = GoodsListFromServerUntil.chaxuns(Integer.parseInt(value));
                    if (chaxuns != -1) {
                        Goodstable goodstable = GoodsListFromServerUntil.Getgood(chaxuns);
                        this.hotKeyGoodsListLabelFID[j].setIcon(new ImageIcon(new ImageIcon("inkImg/number/npk/k/F" + j + ".png").getImage().getScaledInstance(
                                35, 35, 10)));
                        this.hotKeyGoodsListLabel[j].setIcon(new ImageIcon(new ImageIcon("img/item/" + goodstable.getSkin() + ".png").getImage().getScaledInstance(
                                35, 35, 10)));

                    } else {
                        continue;
                    }
                } else {
                    if (StrUtil.isNotBlank(value)) {
                        value = value.split("_")[1];
                        this.hotKeyGoodsListLabelFID[j].setIcon(
                                new ImageIcon(new ImageIcon("inkImg/number/npk/k/F" + j + ".png").getImage().getScaledInstance(
                                        35, 35, 10)));
                        this.hotKeyGoodsListLabel[j].setIcon(
                                new ImageIcon(new ImageIcon("inkImg/old/skill/fighting-skill/" + value + ".png").getImage().getScaledInstance(
                                        35, 35, 10)));

                    }

                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public JLabel getHotKeyBack() {
        return hotKeyBack;
    }

    public void setHotKeyBack(JLabel hotKeyBack) {
        this.hotKeyBack = hotKeyBack;
    }

    public static FormsOnOffBtn getHotKey() {
        return hotKey;
    }

    public static void setHotKey(FormsOnOffBtn hotKey) {
        ZhuJpanel.hotKey = hotKey;
    }

    public JLabel[] getHotKeyGoodsListLabel() {
        return hotKeyGoodsListLabel;
    }

    public void setHotKeyGoodsListLabel(JLabel[] hotKeyGoodsListLabel) {
        this.hotKeyGoodsListLabel = hotKeyGoodsListLabel;
    }

    public JLabel[] getHotKeyGoodsListLabelFID() {
        return hotKeyGoodsListLabelFID;
    }

    public void setHotKeyGoodsListLabelFID(JLabel[] hotKeyGoodsListLabelFID) {
        this.hotKeyGoodsListLabelFID = hotKeyGoodsListLabelFID;
    }

    //快捷栏显示

    public void ssx() {
        String zb = xAndY.getText();

        if(CodeCardJFrame.bjczMainJpanel != null){
            CodeCardJFrame.bjczMainJpanel.rep();
        }


        this.remove(Dbiaoqing);
        this.remove(lableft);
        this.remove(labbottom);
        this.remove(labtop);
        this.remove(labstar);
        this.remove(labadd);
        this.remove(labminus);
        this.remove(bjczBtn);
        this.remove(kuaijieBtn);
        this.remove(childBtn);
        this.remove(knapsackBtn);
        this.remove(groupBtn);
        this.remove(pkBtn);
        this.remove(getBtn);
        this.remove(transactionBtn);
        this.remove(taskBtn);
        this.remove(friendsBtn);
        this.remove(gangBtn);
        this.remove(systemBtn);
        this.remove(petBtn);
        this.remove(transactionBtn1);
        this.remove(rwjnBtn);
        this.remove(labpetimg);
        this.remove(labroleimg);
        this.remove(bbexe);
        this.remove(dangqian);
        this.remove(labnow);
        this.remove(labgroups);
        this.remove(labbangs);
        this.remove(labworld);
        this.remove(labnotice);
        this.remove(jLabelLeftMes);
        this.remove(jLabelLeftMes1);
//        this.remove(jLabelSendMes);
        this.remove(labrolehead);
        this.remove(petlehead);
        this.remove(MapName);
        this.remove(Timemiao);
        this.remove(bbhp);
        this.remove(bbhp);
        this.remove(bbmp);
        this.remove(roleexe);
        this.remove(rolehp);
        this.remove(rolemp);
        this.remove(xAndY);
        this.remove(RanklistBtn);
        this.remove(TJBtn);
//        this.remove(arenaBtn);
//        this.remove(cpBtn);
        this.remove(SendMes);
        if (QianDaoMenu != null) {
            this.remove(QianDaoMenu);
        }
        if (mapiconBtn != null) {
            this.remove(mapiconBtn);
        }
        if (dtck != null) {
            this.remove(dtck);
        }
        this.remove(worldMap);
        this.remove(btnOperation);
        this.remove(btnPlatform);
        this.remove(btnzuoqi);
        this.remove(btnfeixingqi);
        this.remove(testSetupJpanel);
        this.remove(paltBtn);
        this.remove(lainOpenWeb);
        this.remove(szCbg);
        this.remove(viplblq);
        this.remove(jyxyjs);
//        this.remove(xyjys);
        this.remove(zdlh);
        this.remove(vipActive);
        if (chongjiBtn != null) {
            this.remove(chongjiBtn);
        }
        if (rechargeBtn != null) {
            this.remove(rechargeBtn);
        }
        if (oddsBtn != null) {
            this.remove(oddsBtn);
        }
        if (showVipBtn != null) {
            this.remove(showVipBtn);
        }
        if (bjczBtn != null) {
            this.remove(bjczBtn);
        }
        if (guideBtn != null) {
            this.remove(guideBtn);
        }
        if (czlbBtn != null) {
            this.remove(czlbBtn);
        }
        if (pdBtn != null) {
            this.remove(pdBtn);
        }
        this.remove(pdBtn);
        this.remove(labbackground);
        this.remove(ShopingMenu);
        if (DrawMenu != null) {
            this.remove(DrawMenu);
        }
        this.remove(btnOperation);
        this.remove(btnPlatform);
        this.remove(kjsfBtn);
        this.remove(caidan);
        this.remove(lowerRightImgBack);
        if (taskGuideView != null) {
            this.remove(taskGuideView);
        }
        this.remove(CBGBtn);
        this.remove(hdrlBtn);
        this.remove(hotKeyBack);
        this.remove(hotKey);

        if ("水墨UI".equals(MyIsif.getStyle())) {

            Article.xuelans = new ImageIcon[4];
            // 底
            Article.xuelans[0] = new ImageIcon("inkImg/old/background/S2999.png");
            // hp
            Article.xuelans[1] = new ImageIcon("inkImg/newbackground/S29.png");
            // mp
            Article.xuelans[2] = new ImageIcon("inkImg/newbackground/S28.png");
            // exp
            Article.xuelans[3] = new ImageIcon("inkImg/newbackground/S27.png");
        } else {
            Article.xuelans = new ImageIcon[4];
            // 底
            Article.xuelans[0] = new ImageIcon("inkImg/hongmu/2/75_png.xy2uiimg.sempty.png");
            // hp
            Article.xuelans[1] = new ImageIcon("inkImg/hongmu/1/S29.png");
            // mp
            Article.xuelans[2] = new ImageIcon("inkImg/hongmu/1/S28.png");
            // exp
            Article.xuelans[3] = new ImageIcon("inkImg/hongmu/1/S27.png");
        }


        for (int j = 0; j < 8; ++j) {
            this.hotKeyGoodsListLabelFID[j].setVisible(false);
            this.hotKeyGoodsListLabel[j].setVisible(false);
            this.remove(this.hotKeyGoodsListLabelFID[j]);
            this.remove(this.hotKeyGoodsListLabel[j]);
        }
        HotKeyMouseListen.isHide = false;

        //读取配置
        ConfigureBean allConfigure = UserMessUntil.getConfigureBean();
        Map<BigDecimal, Configure> item = allConfigure.getAllConfigure();
        Configure configure = item.get(new BigDecimal(1));
        if ("开".equals(configure.getCjgnkg())) {
            cjkg = "开";
        } else {
            cjkg = "关";
        }
        jjckg = configure.getJjcgnkg();
        mrczkg = configure.getMrczkg();
        mrqdkg = configure.getMrqdgnkg();
        //获取当前坐骑
        if ("水墨UI".equals(MyIsif.getStyle())) {
            this.fightingbtn();
            fightingbtn();
            this.setPreferredSize(new Dimension(ScrenceUntil.Screen_x, ScrenceUntil.Screen_y));
            this.setLayout(null);
            if("开".equals(mrczkg)){
                rechargeBtn = new FormsOnOffBtn("skin/8100226/newbutton/hylh.png", 1, UIUtils.COLOR_BTNTEXT, "", 87);
                rechargeBtn.setBounds(143 +128, 80, 53, 53);
                this.add(rechargeBtn);
            }
            ImageIcon tips = new ImageIcon("inkImg/old/background/S33.png");
            this.labnotice = new JLabel();
            this.labnotice.setIcon(tips);
            this.labnotice.setBounds(10, ScrenceUntil.Screen_y - 161, 51, 25);
            this.labnotice.setForeground(Color.WHITE);
            this.labnotice.setText("传音");
            this.labnotice.setHorizontalTextPosition(0);
            this.labnotice.setFont(UIUtils.TEXT_FONT);
            this.choseNoticeMouslisten = new ChoseNoticeMouslisten(this);
            this.labnotice.addMouseListener(this.choseNoticeMouslisten);
            this.labnotice.setVisible(false);
            this.labworld = new JLabel();
            this.labworld.setIcon(tips);
            this.labworld.setBounds(10, ScrenceUntil.Screen_y - 134, 51, 25);
            this.labworld.setForeground(Color.WHITE);
            this.labworld.setText("世界");
            this.labworld.setHorizontalTextPosition(0);
            this.labworld.setFont(UIUtils.TEXT_FONT);
            this.choseWorldMouslisten = new ChoseWorldMouslisten(this);
            this.labworld.addMouseListener(this.choseWorldMouslisten);
            this.labworld.setVisible(false);
            this.labbangs = new JLabel();
            this.labbangs.setIcon(tips);
            this.labbangs.setBounds(10, ScrenceUntil.Screen_y - 107, 51, 25);
            this.labbangs.setForeground(Color.WHITE);
            this.labbangs.setText("帮派");
            this.labbangs.setHorizontalTextPosition(0);
            this.labbangs.setFont(UIUtils.TEXT_FONT);
            this.choseBangsMouslisten = new ChoseBangsMouslisten(this);
            this.labbangs.addMouseListener(this.choseBangsMouslisten);
            this.labbangs.setVisible(false);
            this.labgroups = new JLabel();
            this.labgroups.setIcon(tips);
            this.labgroups.setBounds(10, ScrenceUntil.Screen_y - 80, 51, 25);
            this.labgroups.setForeground(Color.WHITE);
            this.labgroups.setText("队伍");
            this.labgroups.setHorizontalTextPosition(0);
            this.labgroups.setFont(UIUtils.TEXT_FONT);
            this.choseGroupsMouslisten = new ChoseGroupsMouslisten(this);
            this.labgroups.addMouseListener(this.choseGroupsMouslisten);
            this.labgroups.setVisible(false);
            this.labnow = new JLabel();
            this.labnow.setIcon(tips);
            this.labnow.setBounds(10, ScrenceUntil.Screen_y - 53, 51, 25);
            this.labnow.setForeground(Color.WHITE);
            this.labnow.setText("当前");
            this.labnow.setHorizontalTextPosition(0);
            this.labnow.setFont(UIUtils.TEXT_FONT);
            this.choseNowMouslisten = new ChoseNowMouslisten(this);
            this.labnow.addMouseListener(this.choseNowMouslisten);
            this.labnow.setVisible(false);
            this.dangqian = new JLabel();
            this.dangqian.setBounds(10, ScrenceUntil.Screen_y - 26, 51, 25);
            this.dangqian.setForeground(Color.WHITE);
            this.dangqian.setText("当前");
            this.dangqian.setVerticalTextPosition(0);
            this.dangqian.setHorizontalTextPosition(0);
            this.dangqian.setFont(UIUtils.TEXT_HYK16);
            this.choseDangQianMounslisten = new ChoseDangQianMounslisten(this);
            this.dangqian.addMouseListener(this.choseDangQianMounslisten);
            this.SendMes = new JTextField(40);
            this.SendMes.setBounds(55, ScrenceUntil.Screen_y - 26, ScrenceUntil.SendMsg_x, 25);
            this.SendMes.setForeground(Color.white);
            this.SendMes.setBackground(UIUtils.Color_BACK);
            this.SendMes.setBorder(BorderFactory.createEmptyBorder());
            this.SendMes.setCaretColor(Color.WHITE);
            this.SendMes.setFont(UIUtils.TEXT_MSG);
            this.SendMes.setDocument(new RichDocument());
            this.SendMes.setFocusable(true);
            this.add(this.SendMes);
            this.setVisible(true);
            this.setFocusable(true);
            this.setFocusTraversalKeysEnabled(false);
            this.jLabelLeftMes = new JLabel();
            this.jLabelLeftMes.setIcon(new ImageIcon("inkImg/newbackground/ltsrk.png"));
            this.jLabelLeftMes.setBounds(0, ScrenceUntil.Screen_y - 43, 160, 43);
            jLabelLeftMes1 = new JLabel();
            jLabelLeftMes1.setIcon(new ImageIcon("inkImg/old/background/ltsrkkz.png"));
            jLabelLeftMes1.setBounds(170, ScrenceUntil.Screen_y - 43, 70, 43);
            this.add(this.dangqian);
            this.add(this.labnow);
            this.add(this.labgroups);
            this.add(this.labbangs);
            this.add(this.labworld);
            this.add(this.labnotice);
            this.add(this.jLabelLeftMes);
            //表情图标
            Dbiaoqing = new FormsOnOffBtn("inkImg/old/1/B325.png", 1, 985);
            Dbiaoqing.setBounds(205, 5, 35, 35);
            Dbiaoqing.addMouseListener(new WLLMouslisten(211));
            this.add(this.Dbiaoqing);

            this.add(jLabelLeftMes1);

            this.jLabelSendMes = new JLabel();
            this.jLabelSendMes.setIcon(CutButtonImage.getImage("inkImg/old/background/S31.png", ScrenceUntil.SendMsg_x + 10, -1));
            this.jLabelSendMes.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x + 10, 43);
//            this.add(this.jLabelSendMes);

            // * 0 上 1下 2清屏 3禁言 4左 5调大聊天框 6调小聊天框大小 7透明度改变
            // 左按钮
            lableft = new SmallIconBtn("skin/8100226/button/B44.png", 1, 4, "向左", this);
            this.add(lableft);
            // 下按钮
            labbottom = new SmallIconBtn("skin/8100226/button/B43.png", 1, 1, "向下", this);
            this.add(labbottom);
            // 上按钮
            labtop = new SmallIconBtn("skin/8100226/button/B42.png", 1, 0, "向上", this);
            this.add(labtop);
            // 星星
            labstar = new SmallIconBtn("skin/8100226/button/B41.png", 1, 7, "星星", this);
            this.add(labstar);
            // 加按钮
            labadd = new SmallIconBtn("skin/8100226/button/B35.png", 1, 5, "加号", this);
            this.add(labadd);
            // 减按钮
            labminus = new SmallIconBtn("skin/8100226/button/B36.png", 1, 6, "减号", this);
            this.add(labminus);

//按键


            bjczBtn = new FormsOnOffBtn("skin/8100226/newbutton/qqcd.png", 1, 3100);
            bjczBtn.addMouseListener(new WLLMouslisten(214));
            this.add(bjczBtn);
            childBtn = new FormsOnOffBtn("skin/8100226/newbutton/xhd.png", 1, 1);
            childBtn.addMouseListener(new WLLMouslisten(210));
            this.add(childBtn);
            knapsackBtn = new FormsOnOffBtn("skin/8100226/newbutton/djld.png", 1, 2);
            knapsackBtn.addMouseListener(new WLLMouslisten(209));
            this.add(knapsackBtn);
            groupBtn = new MouseStyleBtn("skin/8100226/newbutton/dwd.png", 1, "组队");
            groupBtn.addMouseListener(new WLLMouslisten(208));
            this.add(groupBtn);
            pkBtn = new MouseStyleBtn("skin/8100226/newbutton/pkd.png", 1, "切磋");
            pkBtn.addMouseListener(new WLLMouslisten(207));
            this.add(pkBtn);
            transactionBtn1 = new MouseStyleBtn("skin/8100226/newbutton/jyd.png", 1, "交易菜单");
            transactionBtn1.addMouseListener(new WLLMouslisten(206));
            this.add(transactionBtn1);
            rwjnBtn = new MouseStyleBtn("skin/8100226/newbutton/jnd.png", 1, "技能");
            rwjnBtn.addMouseListener(new WLLMouslisten(205));
            this.add(rwjnBtn);
            petBtn = new MouseStyleBtn("skin/8100226/newbutton/zqd.png", 1, "坐骑");
            petBtn.addMouseListener(new WLLMouslisten(204));
            this.add(petBtn);
            taskBtn = new FormsOnOffBtn("skin/8100226/newbutton/rwd.png", 1, 3);
            taskBtn.addMouseListener(new WLLMouslisten(203));
            this.add(taskBtn);
            friendsBtn = new FormsOnOffBtn("skin/8100226/newbutton/hyd.png", 1, 4);
            friendsBtn.addMouseListener(new WLLMouslisten(202));
            this.add(friendsBtn);
            gangBtn = new FormsOnOffBtn("skin/8100226/newbutton/bpd.png", 1, 48);
            gangBtn.addMouseListener(new WLLMouslisten(201));
            this.add(gangBtn);

            systemBtn = new MouseStyleBtn("skin/8100226/newbutton/szd.png", 1, "设置");
            systemBtn.addMouseListener(new WLLMouslisten(200));
            this.add(systemBtn);

            this.lowerRightImgBack = new JLabel();
            this.lowerRightImgBack.setIcon(new ImageIcon("inkImg/newbackground/keybarT.png"));
            this.lowerRightImgBack.setBounds(ScrenceUntil.Screen_x - 468, ScrenceUntil.Screen_y - 38, 468, 39);
            this.add(this.lowerRightImgBack);

            labpetimg = new JLabel();
            labpetimg.setBounds(ScrenceUntil.Screen_x - 302, 2, 48, 48);
            labpetimg.addMouseListener(new WLLMouslisten(21));
            this.chosePetMouslisten = new PetPanelShow();
            labpetimg.addMouseListener(this.chosePetMouslisten);
            this.add(labpetimg);

            labroleimg = new JLabel();
            labroleimg.setBounds(ScrenceUntil.Screen_x - 162, 2, 58, 58);
            labroleimg.addMouseListener(new WLLMouslisten(20));
            this.choseRoleStateMouslisten = new RolePanelShow();
            labroleimg.addMouseListener(this.choseRoleStateMouslisten);

            // 从本地文件中获取头像路径
            String roleAvatarPath = null;
            String currentSpeciesId = null;
            try {
                final LoginResult login = RoleData.getRoleData().getLoginResult();
                if (login != null && login.getSpecies_id() != null) {
                    currentSpeciesId = login.getSpecies_id().toString();
                    if (login.getRole_id() != null) {
                        String roleId = login.getRole_id().toString();
                        Properties props = new Properties();
                        File file = new File("resource/other/avatar_" + roleId + ".properties");
                        if (file.exists()) {
                            FileInputStream fis = new FileInputStream(file);
                            props.load(fis);
                            fis.close();

                            // 检查保存的种族ID是否与当前种族ID一致
                            String savedSpeciesId = props.getProperty("speciesId", "");

                            // 如果种族ID一致，则尝试加载自定义头像
                            if (savedSpeciesId.equals(currentSpeciesId)) {
                                roleAvatarPath = props.getProperty("avatarPath", "");
                            } else {
                                // 种族ID不一致，说明发生了转换，更新配置文件
                                props.setProperty("speciesId", currentSpeciesId);
                                // 清除旧的头像路径
                                props.remove("avatarPath");

                                // 保存更新后的配置
                                FileOutputStream fos = new FileOutputStream(file);
                                props.store(fos, "Avatar configuration updated for role " + roleId);
                                fos.close();
                            }
                        } else {
                            // 配置文件不存在，创建新配置文件
                            props.setProperty("speciesId", currentSpeciesId);
                            FileOutputStream fos = new FileOutputStream(file);
                            props.store(fos, "Avatar configuration for role " + roleId);
                            fos.close();
                        }
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
            }

            // 如果有头像路径则使用，否则使用默认头像
            if (roleAvatarPath != null && !roleAvatarPath.isEmpty()) {
                File avatarFile = new File(roleAvatarPath);
                if (avatarFile.exists()) {
                    try {
                        ImageIcon icon = new ImageIcon(roleAvatarPath);
                        Image img = icon.getImage().getScaledInstance(58, 58, Image.SCALE_SMOOTH);
                        icon = new ImageIcon(img);
                        labroleimg.setIcon(icon);
                    } catch (Exception e) {
                        // 加载自定义头像失败，使用默认头像
                        ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                        labroleimg.setIcon(defaultIcon);
                    }
                } else {
                    // 自定义头像文件不存在，使用默认头像
                    ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                    labroleimg.setIcon(defaultIcon);
                }
            } else {
                // 没有自定义头像设置或角色信息不完整，使用默认头像
                String defaultSpeciesId = (currentSpeciesId != null) ? currentSpeciesId : "1";
                ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + defaultSpeciesId + ".png", 58, 58);
                labroleimg.setIcon(defaultIcon);
            }

            this.add(labroleimg);

            /**==========================召唤兽经验=====================================*/
            this.bbexe = new JLabel();
            this.bbexe.addMouseListener(new WLLMouslisten(29));
            this.add(this.bbexe);
            /**==========================召唤兽血条=====================================*/
            this.bbhp = new JLabel();
            this.bbhp.addMouseListener(new ZDCYMouslisten(2));
            this.add(this.bbhp);
            /**==========================召唤兽蓝条=====================================*/
            this.bbmp = new JLabel();
            this.bbmp.addMouseListener(new ZDCYMouslisten(3));
            this.add(this.bbmp);
            /**==========================角色经验=====================================*/
            roleexe = new JLabel();
            roleexe.addMouseListener(new WLLMouslisten(28));
            this.add(this.roleexe);
            /**==========================角色血条=====================================*/
            this.rolehp = new JLabel();
            this.rolehp.addMouseListener(new ZDCYMouslisten(0));
            this.add(this.rolehp);
            /**==========================角色蓝条=====================================*/
            this.rolemp = new JLabel();
            this.rolemp.addMouseListener(new ZDCYMouslisten(1));
            this.add(this.rolemp);
//以下人物宠物血条经验条切换ui自动刷新
            Article.manxie(RoleData.getRoleData().getLoginResult());
            List<RoleSummoning> petList = UserMessUntil.getPetListTable();
            if (petList != null && petList.size() > 0) {
                for (RoleSummoning summoning : petList) {
                    if (RoleData.getRoleData().getLoginResult().getSummoning_id() != null) {
                        if (summoning.getSid().compareTo(RoleData.getRoleData().getLoginResult().getSummoning_id()) == 0) {
                            ZhuJpanel.setLabpetimg("img/newHead/p" + summoning.getSummoningskin() + ".png");
                            Article.souxie(summoning);
                            break;
                        }
                    }
                }
            }

            /**==========================人物头像显示=====================================*/
            labrolehead = new JLabel();
            labrolehead.setIcon(new ImageIcon("inkImg/newbackground/rwtxl.png"));
            this.add(labrolehead);
            /**==========================召唤兽头像显示=====================================*/
            petlehead = new JLabel();
            this.petlehead.setIcon(new ImageIcon("inkImg/newbackground/cwtxl.png"));
            this.add(petlehead);
            /**==========================地图=====================================*/
            MapName = new JLabel();
            MapName.setBounds(15, 6, 80, 20);
            MapName.setForeground(Color.yellow);
            this.add(MapName);
            /**==========================时间显示实例=====================================*/

            //时辰显示关闭
            Timemiao = new JLabel();
            Timemiao.addMouseListener(new WLLMouslisten(0));
            Timemiao.setBounds(6 + 20 * 5, 43, 50, 20);//时辰显示关闭
            Timemiao.setForeground(UIUtils.COLOR_WHITE1[0]);
            Timemiao.setFont(UIUtils.TEXT_FONTZS);
            this.add(Timemiao);
            /**==========================坐标=====================================*/

            xAndY = new JLabel();
            xAndY.setBounds(45, 11, 180, 20);
            xAndY.setForeground(Color.white);
            this.add(xAndY);
            /**==========================坐标=====================================*/


            // 每日活动
            TJBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB1.png", 1, UIUtils.COLOR_BTNTEXT, "", 3072);
            TJBtn.setBounds(2, 45, 20, 20);
            TJBtn.addMouseListener(new WLLMouslisten(304));
            this.add(TJBtn);

            // 排行榜
            RanklistBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB2.png", 1, UIUtils.COLOR_BTNTEXT, "", 60);
            RanklistBtn.setBounds(2 + 22, 45, 20, 20);
            RanklistBtn.addMouseListener(new WLLMouslisten(305));
            this.add(RanklistBtn);
            // 藏宝阁
            CBGBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB3.png", 1, UIUtils.COLOR_BTNTEXT, "", 78);
            CBGBtn.setBounds(2 + 22 * 2, 45, 20, 20);
            CBGBtn.addMouseListener(new WLLMouslisten(306));
            this.add(CBGBtn);

            //活动日历
            hdrlBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB4.png", 1, UIUtils.COLOR_BTNTEXT, "", 40);
            hdrlBtn.setBounds(2 + 22 * 3, 45, 35, 20);
            hdrlBtn.addMouseListener(new WLLMouslisten(307));
            this.add(hdrlBtn);

//        //全民竞猜
//        cpBtn = new FormsOnOffBtn("skin/8100226/button/2竞猜.png", 1, UIUtils.COLOR_BTNTEXT, "", 1105);
//        cpBtn.setBounds(78, 35, 34, 18);
//        if(configure.getQmjckg().equals("开")) {
//            this.add(cpBtn);
//        }


            //左上角小地图图标
            mapiconBtn = new FormsOnOffBtn("skin/8100226/newbutton/B61.png", 1, 22);
            mapiconBtn.setBounds(182, 23, 20, 20);
            mapiconBtn.addMouseListener(new WLLMouslisten(302));
            this.add(mapiconBtn);
            //左上角世界地图图标
            worldMap = new FormsOnOffBtn("skin/8100226/newbutton/B62.png", 1, 1102);
            worldMap.setBounds(182, 3, 20, 20);
            worldMap.addMouseListener(new WLLMouslisten(303));
            this.add(worldMap);

            //飞行器
            this.aircraftBtns = new AircraftBtn[2];
            for (int i = 0; i < this.aircraftBtns.length; ++i) {
                this.aircraftBtns[i] = new AircraftBtn("inkImg/hongmu/2/btnCommon102.png", 1, i == 0 ? "坐骑" : "飞行器", UIUtils.TEXT_FONT, UIUtils.COLOR_RED_BTNTEXT, i + 10, this);
                this.aircraftBtns[i].setBounds(ScrenceUntil.Screen_x - 181, ScrenceUntil.Screen_y - (67 - i * 17), 102, 17);
                this.aircraftBtns[i].setVisible(false);
                this.add(this.aircraftBtns[i]);
            }
            this.btnzuoqi = new AircraftBtn("skin/8100226/newbutton/syaj.png", 1, "坐  骑", UIUtils.TEXT_HY16s, UIUtils.COLOR_WHITE1, 10, this);
            this.btnzuoqi.setBounds(ScrenceUntil.Screen_x - 302, ScrenceUntil.Screen_y - 67, 117, 24);
            this.btnzuoqi.addMouseListener(new WLLMouslisten(212));
            this.btnzuoqi.setVisible(false);
            this.add(this.btnzuoqi);
            btnfeixingqi = new AircraftBtn("skin/8100226/newbutton/syaj.png", 1, "飞  行", UIUtils.TEXT_HY16s, UIUtils.COLOR_WHITE1, 11, this);
            this.btnfeixingqi.setBounds(ScrenceUntil.Screen_x - 302, ScrenceUntil.Screen_y - 50, 117, 24);
            this.btnfeixingqi.addMouseListener(new WLLMouslisten(213));
            this.btnfeixingqi.setVisible(false);
            this.add(this.btnfeixingqi);

            paltBtn = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "退出游戏", 20);
            this.paltBtn.setVisible(false);
            this.add(this.paltBtn);

            testSetupJpanel = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "游戏设置", 200);
            this.testSetupJpanel.setVisible(false);
            this.add(this.testSetupJpanel);

            lainOpenWeb = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "联系客服", 201);
            this.lainOpenWeb.setVisible(false);
            this.add(this.lainOpenWeb);

            szCbg = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "藏宝阁", 202);
            this.szCbg.setVisible(false);
            this.add(this.szCbg);

            viplblq = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "VIP礼包", 199);
            this.viplblq.setVisible(false);
            this.add(this.viplblq);

            jyxyjs = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "全民竞猜", 1098);
            this.jyxyjs.setVisible(false);
            this.add(this.jyxyjs);

//            xyjys = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "协议及隐私", 195);
//            this.xyjys.setVisible(false);
//            this.add(this.xyjys);

            zdlh = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "自动炼化", 196);
            this.zdlh.setVisible(false);
            this.add(this.zdlh);

            vipActive = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "自动任务", 197);
            this.vipActive.setVisible(false);
            this.add(this.vipActive);

            transactionBtn = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "交  易", 203);
            this.transactionBtn.setVisible(false);
            this.add(this.transactionBtn);

            getBtn = new WorkshopBtn("skin/8100226/newbutton/syaj.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "给  予", 204);
            this.getBtn.setVisible(false);
            this.add(this.getBtn);

            //新手引导
            guideBtn = new FormsOnOffBtn("skin/8100226/newbutton/ttIco.png", 1, 604);
            guideBtn.setBounds(20, 78, 53, 53);
            this.add(guideBtn);

            //充值礼包
            czlbBtn = new FormsOnOffBtn("skin/8100226/button/gift-btn.png", 1, 3002);//CHA
            czlbBtn.setBounds(140, 78, 0, 0);
            if ("开".equals(configure.getLbzxkg())) {
                this.add(czlbBtn);
            }

            //冲等礼包
            this.chongjiBtn = new VipShopBtn("skin/8100226/newbutton/SS70.png", 1, 50);
//            chongjiBtn.addMouseListener(new WLLMouslisten(8));
            this.chongjiBtn.setBounds(79, 80, 53, 53);
            if ("开".equals(configure.getLbzxkg())) {
                this.add(this.chongjiBtn);
            }
            //激情泡点
            pdBtn = new FormsOnOffBtn("skin/8100226/button/pd.png", 1, 3003);//CHA
            if ("开".equals(configure.getPdgnkg())) {
                this.add(pdBtn);
            }
            // 快捷操作
            kuaijieBtn = new FormsOnOffBtn("inkImg/button/B420.png", 1, 3100);//CHA
            kuaijieBtn.setBounds(145, 80, 53, 53);
            this.add(kuaijieBtn);

            //        //签到 fei119
            this.QianDaoMenu = new FormsOnOffBtn("inkImg/newbutton/qiandao.png", 1, UIUtils.COLOR_BTNTEXT, "签", 1100);
            this.QianDaoMenu.setBounds(144 +64, 80, 53, 53);;
            if ("开".equals(configure.getQmjckg())) {
                this.add(QianDaoMenu);
            }
            labbackground = new JLabel();
            labbackground.setIcon(new ImageIcon("inkImg/newbackground/S30.png"));
            labbackground.setBounds(0, 0, 201, 67);
            this.add(labbackground);

            ltldt = new JLabel();
            ltldt.setIcon(new ImageIcon("inkImg/old/1/chatjpanel_ltck.png"));
            this.add(ltldt);


            ShopingMenu = new JLabel();
            ShopingMenu.setBounds(205, 5, 35, 35);
            // 打开商城
            ShopingMenu.addMouseListener(new OnlineShopingOpenShopMouslisten());
            ShopingMenu.addMouseListener(new WLLMouslisten(300));
            this.add(ShopingMenu);
            // 设置抽奖按钮
            if ("开".equals(configure.getCjgnkg())) {
                DrawMenu = new JLabel();
                DrawMenu.setBounds(205 + 40, 5, 35, 35);
                DrawMenu.addMouseListener(new WLLMouslisten(308));
                // 打开抽奖
                DrawMenu.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mousePressed(MouseEvent e) {
                        // TODO Auto-generated method stub
                        LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getlotteryTypeGoods(1);
                        FormsManagement.showForm(87);
                    }
                });
                this.add(DrawMenu);
            }
            this.setBackground(UIUtils.Color_BACK);
            this.btnOperation = new TeamPanelBtn("skin/8100226/newbutton/syaj.png", 1, "组队操作", UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, this);
            this.btnOperation.setBounds(ScrenceUntil.Screen_x - 291, ScrenceUntil.Screen_y - 67, 117, 24);
            this.btnOperation.setVisible(false);
            this.add(this.btnOperation);
            this.btnPlatform = new TeamPanelBtn("skin/8100226/newbutton/syaj.png", 1, "组队平台", UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, this);
            this.btnPlatform.setBounds(ScrenceUntil.Screen_x - 291, ScrenceUntil.Screen_y - 50, 117, 24);
            this.btnPlatform.setVisible(false);
            this.add(this.btnPlatform);

            this.taskGuideView = new TaskGuideView();
            this.add(this.taskGuideView);

            final TesttaskJapnel task = TesttaskJframe.getTesttaskJframe().getJtask();
            if (task.getCaozuo() == 1) {
                this.taskGuideView.setVisible(false);
            } else {
                if (this.taskGuideView.isV()) {
                    this.taskGuideView.setVisible(this.taskGuideView.isV());
                }
            }


            this.kjsfBtn = new JLabel();
            this.kjsfBtn.setIcon(new ImageIcon("inkImg/hongmu/2/快捷_w250.png"));
            this.kjsfBtn.setBounds(ScrenceUntil.Screen_x - 338, ScrenceUntil.Screen_y - 38, 338, 38);
//      this.add(this.kjsfBtn);

//左上角扩展快捷
            this.caidan = new VipShopBtn("skin/8100226/newbutton/sjajgb.png", 1, 56);
            caidan.addMouseListener(new WLLMouslisten(7));
            this.add(this.caidan);


            ImageIcon hotKeyBackImg = new ImageIcon("inkImg/newbackground/xbbkjl.png");
            hotKeyMethod(hotKeyBackImg);
        } else {
            this.fightingbtn();
            fightingbtn();
            this.setPreferredSize(new Dimension(ScrenceUntil.Screen_x, ScrenceUntil.Screen_y));
            this.setLayout(null);
            if("开".equals(mrczkg)){
                rechargeBtn = new FormsOnOffBtn("skin/8100226/newbutton/hylh.png", 1, UIUtils.COLOR_BTNTEXT, "", 87);
                rechargeBtn.setBounds(143 +128, 80, 53, 53);
                this.add(rechargeBtn);
            }
            ImageIcon tips = new ImageIcon("inkImg/old/background/S33.png");
            this.labnotice = new JLabel();
            this.labnotice.setIcon(tips);
            this.labnotice.setBounds(10, ScrenceUntil.Screen_y - 161, 51, 25);
            this.labnotice.setForeground(Color.WHITE);
            this.labnotice.setText("传音");
            this.labnotice.setHorizontalTextPosition(0);
            this.labnotice.setFont(UIUtils.TEXT_FONT);
            this.choseNoticeMouslisten = new ChoseNoticeMouslisten(this);
            this.labnotice.addMouseListener(this.choseNoticeMouslisten);
            this.labnotice.setVisible(false);
            this.labworld = new JLabel();
            this.labworld.setIcon(tips);
            this.labworld.setBounds(10, ScrenceUntil.Screen_y - 134, 51, 25);
            this.labworld.setForeground(Color.WHITE);
            this.labworld.setText("世界");
            this.labworld.setHorizontalTextPosition(0);
            this.labworld.setFont(UIUtils.TEXT_FONT);
            this.choseWorldMouslisten = new ChoseWorldMouslisten(this);
            this.labworld.addMouseListener(this.choseWorldMouslisten);
            this.labworld.setVisible(false);
            this.labbangs = new JLabel();
            this.labbangs.setIcon(tips);
            this.labbangs.setBounds(10, ScrenceUntil.Screen_y - 107, 51, 25);
            this.labbangs.setForeground(Color.WHITE);
            this.labbangs.setText("帮派");
            this.labbangs.setHorizontalTextPosition(0);
            this.labbangs.setFont(UIUtils.TEXT_FONT);
            this.choseBangsMouslisten = new ChoseBangsMouslisten(this);
            this.labbangs.addMouseListener(this.choseBangsMouslisten);
            this.labbangs.setVisible(false);
            this.labgroups = new JLabel();
            this.labgroups.setIcon(tips);
            this.labgroups.setBounds(10, ScrenceUntil.Screen_y - 80, 51, 25);
            this.labgroups.setForeground(Color.WHITE);
            this.labgroups.setText("队伍");
            this.labgroups.setHorizontalTextPosition(0);
            this.labgroups.setFont(UIUtils.TEXT_FONT);
            this.choseGroupsMouslisten = new ChoseGroupsMouslisten(this);
            this.labgroups.addMouseListener(this.choseGroupsMouslisten);
            this.labgroups.setVisible(false);
            this.labnow = new JLabel();
            this.labnow.setIcon(tips);
            this.labnow.setBounds(10, ScrenceUntil.Screen_y - 53, 51, 25);
            this.labnow.setForeground(Color.WHITE);
            this.labnow.setText("当前");
            this.labnow.setHorizontalTextPosition(0);
            this.labnow.setFont(UIUtils.TEXT_FONT);
            this.choseNowMouslisten = new ChoseNowMouslisten(this);
            this.labnow.addMouseListener(this.choseNowMouslisten);
            this.labnow.setVisible(false);
            this.dangqian = new JLabel();
            this.dangqian.setBounds(10, ScrenceUntil.Screen_y - 26, 51, 25);
            this.dangqian.setForeground(Color.WHITE);
            this.dangqian.setText("当前");
            this.dangqian.setVerticalTextPosition(0);
            this.dangqian.setHorizontalTextPosition(0);
            this.dangqian.setFont(UIUtils.TEXT_HYK16);
            this.choseDangQianMounslisten = new ChoseDangQianMounslisten(this);
            this.dangqian.addMouseListener(this.choseDangQianMounslisten);
            this.SendMes = new JTextField(40);
            this.SendMes.setBounds(55, ScrenceUntil.Screen_y - 26, ScrenceUntil.SendMsg_x, 25);
            this.SendMes.setForeground(Color.white);
            this.SendMes.setBackground(UIUtils.Color_BACK);
            this.SendMes.setBorder(BorderFactory.createEmptyBorder());
            this.SendMes.setCaretColor(Color.WHITE);
            this.SendMes.setFont(UIUtils.TEXT_MSG);
            this.SendMes.setDocument(new RichDocument());
            this.SendMes.setFocusable(true);
            this.add(this.SendMes);
            this.setVisible(true);
            this.setFocusable(true);
            this.setFocusTraversalKeysEnabled(false);
            this.jLabelLeftMes = new JLabel();
            this.jLabelLeftMes.setIcon(new ImageIcon("inkImg/hongmu/1/ltsrkh.png"));
            this.jLabelLeftMes.setBounds(0, ScrenceUntil.Screen_y - 43, 160, 43);
            jLabelLeftMes1 = new JLabel();
            jLabelLeftMes1.setIcon(new ImageIcon("inkImg/hongmu/2/聊天框0000大1.png"));
            jLabelLeftMes1.setBounds(70, ScrenceUntil.Screen_y - 21, ScrenceUntil.Screen_x + 70, 25);
            this.add(this.dangqian);
            this.add(this.labnow);
            this.add(this.labgroups);
            this.add(this.labbangs);
            this.add(this.labworld);
            this.add(this.labnotice);
            this.add(this.jLabelLeftMes);
            //表情图标
            Dbiaoqing = new FormsOnOffBtn("inkImg/old/1/B325.png", 1, 985);
            Dbiaoqing.setBounds(205, 5, 35, 35);
            Dbiaoqing.addMouseListener(new WLLMouslisten(211));
            this.add(this.Dbiaoqing);

            this.add(this.jLabelLeftMes1);

            this.jLabelSendMes = new JLabel();
            this.jLabelSendMes.setIcon(CutButtonImage.getImage("inkImg/old/background/S31.png", ScrenceUntil.SendMsg_x + 10, -1));
            this.jLabelSendMes.setBounds(160, ScrenceUntil.Screen_y - 43, ScrenceUntil.SendMsg_x + 10, 43);
//            this.add(this.jLabelSendMes);

            // * 0 上 1下 2清屏 3禁言 4左 5调大聊天框 6调小聊天框大小 7透明度改变
            // 左按钮
            lableft = new SmallIconBtn("skin/8100226/button/B44.png", 1, 4, "向左", this);
            this.add(lableft);
            // 下按钮
            labbottom = new SmallIconBtn("skin/8100226/button/B43.png", 1, 1, "向下", this);
            this.add(labbottom);
            // 上按钮
            labtop = new SmallIconBtn("skin/8100226/button/B42.png", 1, 0, "向上", this);
            this.add(labtop);
            // 星星
            labstar = new SmallIconBtn("skin/8100226/button/B41.png", 1, 7, "星星", this);
            this.add(labstar);
            // 加按钮
            labadd = new SmallIconBtn("skin/8100226/button/B35.png", 1, 5, "加号", this);
            this.add(labadd);
            // 减按钮
            labminus = new SmallIconBtn("skin/8100226/button/B36.png", 1, 6, "减号", this);
            this.add(labminus);

//按键


            bjczBtn = new FormsOnOffBtn("skin/8100226/newbutton/qqcdh.png", 1, 3100);
            bjczBtn.addMouseListener(new WLLMouslisten(214));
            this.add(bjczBtn);
            childBtn = new FormsOnOffBtn("skin/8100226/newbutton/xhdh.png", 1, 1);
            childBtn.addMouseListener(new WLLMouslisten(210));
            this.add(childBtn);
            knapsackBtn = new FormsOnOffBtn("skin/8100226/newbutton/djldh.png", 1, 2);
            knapsackBtn.addMouseListener(new WLLMouslisten(209));
            this.add(knapsackBtn);
            groupBtn = new MouseStyleBtn("skin/8100226/newbutton/dwdh.png", 1, "组队");
            groupBtn.addMouseListener(new WLLMouslisten(208));
            this.add(groupBtn);
            pkBtn = new MouseStyleBtn("skin/8100226/newbutton/pkdh.png", 1, "切磋");
            pkBtn.addMouseListener(new WLLMouslisten(207));
            this.add(pkBtn);
            transactionBtn1 = new MouseStyleBtn("skin/8100226/newbutton/jydh.png", 1, "交易菜单");
            transactionBtn1.addMouseListener(new WLLMouslisten(206));
            this.add(transactionBtn1);
            rwjnBtn = new MouseStyleBtn("skin/8100226/newbutton/jndh.png", 1, "技能");
            rwjnBtn.addMouseListener(new WLLMouslisten(205));
            this.add(rwjnBtn);
            petBtn = new MouseStyleBtn("skin/8100226/newbutton/zqdh.png", 1, "坐骑");
            petBtn.addMouseListener(new WLLMouslisten(204));
            this.add(petBtn);
            taskBtn = new FormsOnOffBtn("skin/8100226/newbutton/rwdh.png", 1, 3);
            taskBtn.addMouseListener(new WLLMouslisten(203));
            this.add(taskBtn);
            friendsBtn = new FormsOnOffBtn("skin/8100226/newbutton/hydh.png", 1, 4);
            friendsBtn.addMouseListener(new WLLMouslisten(202));
            this.add(friendsBtn);
            gangBtn = new FormsOnOffBtn("skin/8100226/newbutton/bpdh.png", 1, 48);
            gangBtn.addMouseListener(new WLLMouslisten(201));
            this.add(gangBtn);

            systemBtn = new MouseStyleBtn("skin/8100226/newbutton/szdh.png", 1, "设置");
            systemBtn.addMouseListener(new WLLMouslisten(200));
            this.add(systemBtn);

            this.lowerRightImgBack = new JLabel();
            this.lowerRightImgBack.setIcon(new ImageIcon("inkImg/hongmu/keybarTh.png"));
            this.lowerRightImgBack.setBounds(ScrenceUntil.Screen_x - 468, ScrenceUntil.Screen_y - 38, 468, 39);
            this.add(this.lowerRightImgBack);

            labpetimg = new JLabel();
            labpetimg.setBounds(ScrenceUntil.Screen_x - 302, 2, 48, 48);
            labpetimg.addMouseListener(new WLLMouslisten(21));
            this.chosePetMouslisten = new PetPanelShow();
            labpetimg.addMouseListener(this.chosePetMouslisten);
            this.add(labpetimg);

            labroleimg = new JLabel();
            labroleimg.setBounds(ScrenceUntil.Screen_x - 162, 2, 58, 58);
            labroleimg.addMouseListener(new WLLMouslisten(20));
            this.choseRoleStateMouslisten = new RolePanelShow();
            labroleimg.addMouseListener(this.choseRoleStateMouslisten);

            // 从本地文件中获取头像路径
            String roleAvatarPath = null;
            String currentSpeciesId = null;
            try {
                final LoginResult login = RoleData.getRoleData().getLoginResult();
                if (login != null && login.getSpecies_id() != null) {
                    currentSpeciesId = login.getSpecies_id().toString();
                    if (login.getRole_id() != null) {
                        String roleId = login.getRole_id().toString();
                        Properties props = new Properties();
                        File file = new File("resource/other/avatar_" + roleId + ".properties");
                        if (file.exists()) {
                            FileInputStream fis = new FileInputStream(file);
                            props.load(fis);
                            fis.close();

                            // 检查保存的种族ID是否与当前种族ID一致
                            String savedSpeciesId = props.getProperty("speciesId", "");

                            // 如果种族ID一致，则尝试加载自定义头像
                            if (savedSpeciesId.equals(currentSpeciesId)) {
                                roleAvatarPath = props.getProperty("avatarPath", "");
                            } else {
                                // 种族ID不一致，说明发生了转换，更新配置文件
                                props.setProperty("speciesId", currentSpeciesId);
                                // 清除旧的头像路径
                                props.remove("avatarPath");

                                // 保存更新后的配置
                                FileOutputStream fos = new FileOutputStream(file);
                                props.store(fos, "Avatar configuration updated for role " + roleId);
                                fos.close();
                            }
                        } else {
                            // 配置文件不存在，创建新配置文件
                            props.setProperty("speciesId", currentSpeciesId);
                            FileOutputStream fos = new FileOutputStream(file);
                            props.store(fos, "Avatar configuration for role " + roleId);
                            fos.close();
                        }
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
            }

            // 如果有头像路径则使用，否则使用默认头像
            if (roleAvatarPath != null && !roleAvatarPath.isEmpty()) {
                File avatarFile = new File(roleAvatarPath);
                if (avatarFile.exists()) {
                    try {
                        ImageIcon icon = new ImageIcon(roleAvatarPath);
                        Image img = icon.getImage().getScaledInstance(58, 58, Image.SCALE_SMOOTH);
                        icon = new ImageIcon(img);
                        labroleimg.setIcon(icon);
                    } catch (Exception e) {
                        // 加载自定义头像失败，使用默认头像
                        ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                        labroleimg.setIcon(defaultIcon);
                    }
                } else {
                    // 自定义头像文件不存在，使用默认头像
                    ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                    labroleimg.setIcon(defaultIcon);
                }
            } else {
                // 没有自定义头像设置或角色信息不完整，使用默认头像
                String defaultSpeciesId = (currentSpeciesId != null) ? currentSpeciesId : "1";
                ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + defaultSpeciesId + ".png", 58, 58);
                labroleimg.setIcon(defaultIcon);
            }

            this.add(labroleimg);
            /**==========================召唤兽经验=====================================*/
            this.bbexe = new JLabel();
            this.bbexe.addMouseListener(new WLLMouslisten(29));
            this.add(this.bbexe);
            /**==========================召唤兽血条=====================================*/
            this.bbhp = new JLabel();
            this.bbhp.addMouseListener(new ZDCYMouslisten(2));
            this.add(this.bbhp);
            /**==========================召唤兽蓝条=====================================*/
            this.bbmp = new JLabel();
            this.bbmp.addMouseListener(new ZDCYMouslisten(3));
            this.add(this.bbmp);
            /**==========================角色经验=====================================*/
            roleexe = new JLabel();
            roleexe.addMouseListener(new WLLMouslisten(28));
            this.add(this.roleexe);
            /**==========================角色血条=====================================*/
            this.rolehp = new JLabel();
            this.rolehp.addMouseListener(new ZDCYMouslisten(0));
            this.add(this.rolehp);
            /**==========================角色蓝条=====================================*/
            this.rolemp = new JLabel();
            this.rolemp.addMouseListener(new ZDCYMouslisten(1));
            this.add(this.rolemp);
//以下人物宠物血条经验条切换ui自动刷新
            Article.manxie(RoleData.getRoleData().getLoginResult());
            List<RoleSummoning> petList = UserMessUntil.getPetListTable();
            if (petList != null && petList.size() > 0) {
                for (RoleSummoning summoning : petList) {
                    if (summoning != null && RoleData.getRoleData().getLoginResult().getSummoning_id() != null && summoning.getSid().compareTo(RoleData.getRoleData().getLoginResult().getSummoning_id()) == 0) {
                        ZhuJpanel.setLabpetimg("img/newHead/p" + summoning.getSummoningskin() + ".png");
                        Article.souxie(summoning);
                        break;
                    }
                }
            }

            /**==========================人物头像显示=====================================*/
            labrolehead = new JLabel();
            labrolehead.setIcon(new ImageIcon("inkImg/hongmu/rwtxlh.png"));
            this.add(labrolehead);
            /**==========================召唤兽头像显示=====================================*/
            petlehead = new JLabel();
            this.petlehead.setIcon(new ImageIcon("inkImg/hongmu/cwtxlh.png"));
            this.add(petlehead);
            /**==========================地图=====================================*/
            MapName = new JLabel();
            MapName.setBounds(15, 6, 80, 20);
            MapName.setForeground(Color.yellow);
            this.add(MapName);
            /**==========================时间显示实例=====================================*/

            //时辰显示关闭
            Timemiao = new JLabel();
            Timemiao.addMouseListener(new WLLMouslisten(0));
            Timemiao.setBounds(6 + 20 * 5, 43, 50, 20);//时辰显示关闭
            Timemiao.setForeground(UIUtils.COLOR_WHITE1[0]);
            Timemiao.setFont(UIUtils.TEXT_FONTZS);
            this.add(Timemiao);
            /**==========================坐标=====================================*/

            xAndY = new JLabel();
            xAndY.setBounds(45, 11, 180, 20);
            xAndY.setForeground(Color.white);
            this.add(xAndY);

            /**==========================坐标=====================================*/


            // 每日活动
            TJBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB1h.png", 1, UIUtils.COLOR_BTNTEXT, "", 3072);
            TJBtn.setBounds(2, 45, 20, 20);
            TJBtn.addMouseListener(new WLLMouslisten(304));
            this.add(TJBtn);

            // 排行榜
            RanklistBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB2h.png", 1, UIUtils.COLOR_BTNTEXT, "", 60);
            RanklistBtn.setBounds(2 + 22, 45, 20, 20);
            RanklistBtn.addMouseListener(new WLLMouslisten(305));
            this.add(RanklistBtn);
            // 藏宝阁
            CBGBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB3h.png", 1, UIUtils.COLOR_BTNTEXT, "", 78);
            CBGBtn.setBounds(2 + 22 * 2, 45, 20, 20);
            CBGBtn.addMouseListener(new WLLMouslisten(306));
            this.add(CBGBtn);

            //活动日历
            hdrlBtn = new FormsOnOffBtn("skin/8100226/newbutton/XTB4h.png", 1, UIUtils.COLOR_BTNTEXT, "", 40);
            hdrlBtn.setBounds(2 + 22 * 3, 45, 35, 20);
            hdrlBtn.addMouseListener(new WLLMouslisten(307));
            this.add(hdrlBtn);

//        //全民竞猜
//        cpBtn = new FormsOnOffBtn("skin/8100226/button/2竞猜.png", 1, UIUtils.COLOR_BTNTEXT, "", 1105);
//        cpBtn.setBounds(78, 35, 34, 18);
//        if(configure.getQmjckg().equals("开")) {
//            this.add(cpBtn);
//        }


            //左上角小地图图标
            mapiconBtn = new FormsOnOffBtn("skin/8100226/newbutton/B61h.png", 1, 22);
            mapiconBtn.setBounds(182, 23, 20, 20);
            mapiconBtn.addMouseListener(new WLLMouslisten(302));
            this.add(mapiconBtn);
            //左上角世界地图图标
            worldMap = new FormsOnOffBtn("skin/8100226/newbutton/B62h.png", 1, 1102);
            worldMap.setBounds(182, 3, 20, 20);
            worldMap.addMouseListener(new WLLMouslisten(303));
            this.add(worldMap);

            //飞行器
            this.aircraftBtns = new AircraftBtn[2];
            for (int i = 0; i < this.aircraftBtns.length; ++i) {
                this.aircraftBtns[i] = new AircraftBtn("inkImg/hongmu/2/btnCommon102.png", 1, i == 0 ? "坐骑" : "飞行器", UIUtils.TEXT_FONT, UIUtils.COLOR_RED_BTNTEXT, i + 10, this);
                this.aircraftBtns[i].setBounds(ScrenceUntil.Screen_x - 181, ScrenceUntil.Screen_y - (67 - i * 17), 102, 17);
                this.aircraftBtns[i].setVisible(false);
                this.add(this.aircraftBtns[i]);
            }
            this.btnzuoqi = new AircraftBtn("skin/8100226/newbutton/syajh.png", 1, "坐  骑", UIUtils.TEXT_HY16s, UIUtils.COLOR_WHITE3, 10, this);
            this.btnzuoqi.setBounds(ScrenceUntil.Screen_x - 302, ScrenceUntil.Screen_y - 67, 117, 24);
            this.btnzuoqi.addMouseListener(new WLLMouslisten(212));
            this.btnzuoqi.setVisible(false);
            this.add(this.btnzuoqi);
            btnfeixingqi = new AircraftBtn("skin/8100226/newbutton/syajh.png", 1, "飞  行", UIUtils.TEXT_HY16s, UIUtils.COLOR_WHITE3, 11, this);
            this.btnfeixingqi.setBounds(ScrenceUntil.Screen_x - 302, ScrenceUntil.Screen_y - 50, 117, 24);
            this.btnfeixingqi.addMouseListener(new WLLMouslisten(213));
            this.btnfeixingqi.setVisible(false);
            this.add(this.btnfeixingqi);

            paltBtn = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "退出游戏", 20);
            this.paltBtn.setVisible(false);
            this.add(this.paltBtn);

            testSetupJpanel = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "游戏设置", 200);
            this.testSetupJpanel.setVisible(false);
            this.add(this.testSetupJpanel);

            lainOpenWeb = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "联系客服", 201);
            this.lainOpenWeb.setVisible(false);
            this.add(this.lainOpenWeb);

            szCbg = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "藏宝阁", 202);
            this.szCbg.setVisible(false);
            this.add(this.szCbg);

            viplblq = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "VIP礼包", 199);
            this.viplblq.setVisible(false);
            this.add(this.viplblq);

            jyxyjs = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "全民竞猜", 1098);
            this.jyxyjs.setVisible(false);
            this.add(this.jyxyjs);

//            xyjys = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "协议及隐私", 195);
//            this.xyjys.setVisible(false);
//            this.add(this.xyjys);

            zdlh = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "自动炼化", 196);
            this.zdlh.setVisible(false);
            this.add(this.zdlh);

            vipActive = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE1, UIUtils.TEXT_HY16s, "自动任务", 197);
            this.vipActive.setVisible(false);
            this.add(this.vipActive);

            transactionBtn = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "交  易", 203);
            this.transactionBtn.setVisible(false);
            this.add(this.transactionBtn);

            getBtn = new WorkshopBtn("skin/8100226/newbutton/syajh.png", 1, UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, "给  予", 204);
            this.getBtn.setVisible(false);
            this.add(this.getBtn);

            //新手引导
            guideBtn = new FormsOnOffBtn("skin/8100226/newbutton/ttIco.png", 1, 604);
            guideBtn.setBounds(20, 78, 53, 53);
            this.add(guideBtn);

            //充值礼包
            czlbBtn = new FormsOnOffBtn("skin/8100226/button/gift-btn.png", 1, 3002);//CHA
            czlbBtn.setBounds(140, 78, 0, 0);
            if ("开".equals(configure.getLbzxkg())) {
                this.add(czlbBtn);
            }

            //冲等礼包
            this.chongjiBtn = new VipShopBtn("skin/8100226/newbutton/SS70.png", 1, 50);
//            chongjiBtn.addMouseListener(new WLLMouslisten(8));
            this.chongjiBtn.setBounds(79, 80, 53, 53);
            if ("开".equals(configure.getLbzxkg())) {
                this.add(this.chongjiBtn);
            }
            //激情泡点
            pdBtn = new FormsOnOffBtn("skin/8100226/button/pd.png", 1, 3003);//CHA
            if ("开".equals(configure.getPdgnkg())) {
                this.add(pdBtn);
            }

            // 快捷操作
            kuaijieBtn = new FormsOnOffBtn("inkImg/button/B420.png", 1, 3100);//CHA
            kuaijieBtn.setBounds(145, 80, 53, 53);
            this.add(kuaijieBtn);

            //        //签到 fei119
            this.QianDaoMenu = new FormsOnOffBtn("inkImg/newbutton/qiandao.png", 1, UIUtils.COLOR_BTNTEXT, "签", 1100);
            this.QianDaoMenu.setBounds(144 +64, 80, 53, 53);;
            if ("开".equals(configure.getQmjckg())) {
                this.add(QianDaoMenu);
            }

            labbackground = new JLabel();
            labbackground.setIcon(new ImageIcon("inkImg/hongmu/S30h.png"));
            labbackground.setBounds(0, 0, 201, 67);
            this.add(labbackground);

            ltldt = new JLabel();
            ltldt.setIcon(new ImageIcon("inkImg/old/1/chatjpanel_ltck.png"));
            this.add(ltldt);


            ShopingMenu = new JLabel();
            ShopingMenu.setBounds(205, 5, 35, 35);
            // 打开商城
            ShopingMenu.addMouseListener(new OnlineShopingOpenShopMouslisten());
            ShopingMenu.addMouseListener(new WLLMouslisten(300));
            this.add(ShopingMenu);
            // 设置抽奖按钮
            if ("开".equals(configure.getCjgnkg())) {
                DrawMenu = new JLabel();
                DrawMenu.setBounds(205 + 40, 5, 35, 35);
                DrawMenu.addMouseListener(new WLLMouslisten(308));
                // 打开抽奖
                DrawMenu.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mousePressed(MouseEvent e) {
                        // TODO Auto-generated method stub
                        LotteryMainFrame.getLotteryMainFrame().getLotteryMainPanel().getlotteryTypeGoods(1);
                        FormsManagement.showForm(87);
                    }
                });
                this.add(DrawMenu);
            }
            this.setBackground(UIUtils.Color_BACK);
            this.btnOperation = new TeamPanelBtn("skin/8100226/newbutton/syajh.png", 1, "组队操作", UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, this);
            this.btnOperation.setBounds(ScrenceUntil.Screen_x - 291, ScrenceUntil.Screen_y - 67, 117, 24);
            this.btnOperation.setVisible(false);
            this.add(this.btnOperation);
            this.btnPlatform = new TeamPanelBtn("skin/8100226/newbutton/syajh.png", 1, "组队平台", UIUtils.COLOR_WHITE3, UIUtils.TEXT_HY16s, this);
            this.btnPlatform.setBounds(ScrenceUntil.Screen_x - 291, ScrenceUntil.Screen_y - 50, 117, 24);
            this.btnPlatform.setVisible(false);
            this.add(this.btnPlatform);

            this.taskGuideView = new TaskGuideView();
            this.add(this.taskGuideView);


            this.kjsfBtn = new JLabel();
            this.kjsfBtn.setIcon(new ImageIcon("inkImg/hongmu/2/快捷_w250.png"));
            this.kjsfBtn.setBounds(ScrenceUntil.Screen_x - 338, ScrenceUntil.Screen_y - 38, 338, 38);
//      this.add(this.kjsfBtn);

//左上角扩展快捷
            this.caidan = new VipShopBtn("skin/8100226/newbutton/sjajgbh.png", 1, 56);
            caidan.addMouseListener(new WLLMouslisten(7));
            this.add(this.caidan);
            ImageIcon hotKeyBackImg = new ImageIcon("inkImg/hongmu/xbbkjlh.png");
            hotKeyMethod(hotKeyBackImg);
        }
        ZhuJpanel.getxAndY().setText(zb);
        BtnChange();
    }

    public void clearHotkeySkill() {
        try {
            String roleId = ImageMixDeal.userimg.getRoleShow().getRole_id().toString();
            String s = Util.readHotkey(roleId);
            if (s == null) {
                return;
            }
            JSON parse = JSONUtil.parse(Util.readHotkey(roleId));
            Map hashMap = parse.toBean(Map.class);
            HotKeyMouseListen.keyMap = hashMap;
            //system.out.println(hashMap);

            int Flag = 0;
            int count = 1;
            for (int j = 0; j < 8; ++j) {
                String name = "hot_" + String.valueOf(j);
                String value = HotKeyMouseListen.keyMap.get(name);
                boolean number = NumberUtil.isNumber(value);
                if (number) {
                    int chaxuns = GoodsListFromServerUntil.chaxuns(Integer.parseInt(value));
                    if (chaxuns != -1) {
                        Goodstable goodstable = GoodsListFromServerUntil.Getgood(chaxuns);

                        this.hotKeyGoodsListLabelFID[j].setIcon(new ImageIcon(new ImageIcon("inkImg/number/npk/k/F" + j + ".png").getImage().getScaledInstance(
                                35, 35, 10)));
                        this.hotKeyGoodsListLabel[j].setIcon(new ImageIcon(new ImageIcon("img/item/" + goodstable.getSkin() + ".png").getImage().getScaledInstance(
                                35, 35, 10)));
                        HotKeyMouseListen.keyMap.put(name, goodstable.getGoodsid().toString());
                        String skey = JSONUtil.toJsonStr(HotKeyMouseListen.keyMap);
                        Util.writeHotkey(roleId, skey);
                    } else {
                        continue;
                    }
                } else {
                    if (StrUtil.isNotBlank(value)) {
                        this.hotKeyGoodsListLabelFID[j].setIcon(null);
                        this.hotKeyGoodsListLabel[j].setIcon(null);
                        HotKeyMouseListen.keyMap.remove(name);
                        String skey = JSONUtil.toJsonStr(HotKeyMouseListen.keyMap);
                        Util.writeHotkey(roleId, skey);
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    private static Goodstable goodstableAlf;
    public static void setGoodstableAlf(final Goodstable goodstableAlf) {
        ZhuJpanel.goodstableAlf = goodstableAlf;
    }

    public static Goodstable getGoodstableAlf() {
        return ZhuJpanel.goodstableAlf;
    }

    /**
     * 更新主界面上的角色头像显示
     * @param avatarPath 新的头像路径
     */
    public void updateRoleImg(String avatarPath) {
        if (labroleimg != null) {
            try {
                // 获取当前角色信息
                LoginResult loginResult = RoleData.getRoleData().getLoginResult();
                if (loginResult != null) {
                    String roleId = loginResult.getRole_id().toString();
                    String currentSpeciesId = loginResult.getSpecies_id().toString();

                    // 检查并更新角色配置文件
                    Properties props = new Properties();
                    // 修改配置文件路径到resource/other目录
                    File file = new File("resource/other/avatar_" + roleId + ".properties");
                    boolean needUpdateConfig = false;

                    if (file.exists()) {
                        FileInputStream fis = new FileInputStream(file);
                        props.load(fis);
                        fis.close();

                        String savedSpeciesId = props.getProperty("speciesId", "");
                        // 如果种族ID不匹配，说明发生了转换
                        if (!savedSpeciesId.equals(currentSpeciesId)) {
                            props.setProperty("speciesId", currentSpeciesId);
                            needUpdateConfig = true;
                        }
                    } else {
                        // 创建新的配置文件
                        props.setProperty("speciesId", currentSpeciesId);
                        needUpdateConfig = true;
                    }

                    // 如果需要更新配置文件
                    if (needUpdateConfig) {
                        // 确保resource/other目录存在
                        File directory = new File("resource/other");
                        if (!directory.exists()) {
                            directory.mkdirs();
                        }
                        FileOutputStream fos = new FileOutputStream(new File("resource/other/avatar_" + roleId + ".properties"));
                        props.store(fos, "Avatar Path for role " + roleId);
                        fos.close();
                    }

                    // 检查传入的路径是否为自定义头像
                    File passedAvatarFile = new File(avatarPath);
                    if (passedAvatarFile.exists() && avatarPath.startsWith("img/")) {
                        // 这是一个有效的头像路径，使用它
                        ImageIcon icon = new ImageIcon(avatarPath);
                        // 缩放图片到合适的尺寸
                        Image img = icon.getImage().getScaledInstance(58, 58, Image.SCALE_SMOOTH);
                        icon = new ImageIcon(img);
                        labroleimg.setIcon(icon);

                        // 更新配置文件中的头像路径
                        String savedAvatarPath = props.getProperty("avatarPath", "");
                        if (!savedAvatarPath.equals(avatarPath)) {
                            props.setProperty("avatarPath", avatarPath);
                            // 确保resource/other目录存在
                            File directory = new File("resource/other");
                            if (!directory.exists()) {
                                directory.mkdirs();
                            }
                            FileOutputStream fos = new FileOutputStream(new File("resource/other/avatar_" + roleId + ".properties"));
                            props.store(fos, "Avatar Path for role " + roleId);
                            fos.close();
                        }
                    } else {
                        // 检查配置文件中的自定义头像
                        String savedAvatarPath = props.getProperty("avatarPath", "");
                        File avatarFile = new File(savedAvatarPath);

                        // 如果配置文件中保存的自定义头像存在，则使用它
                        if (avatarFile.exists()) {
                            ImageIcon icon = new ImageIcon(savedAvatarPath);
                            // 缩放图片到合适的尺寸
                            Image img = icon.getImage().getScaledInstance(58, 58, Image.SCALE_SMOOTH);
                            icon = new ImageIcon(img);
                            labroleimg.setIcon(icon);
                        }
                        // 否则使用当前种族的默认头像
                        else {
                            ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                            labroleimg.setIcon(defaultIcon);

                            // 清除配置文件中不存在的头像路径
                            if (!savedAvatarPath.isEmpty()) {
                                props.remove("avatarPath");
                                // 确保resource/other目录存在
                                File directory = new File("resource/other");
                                if (!directory.exists()) {
                                    directory.mkdirs();
                                }
                                FileOutputStream fos = new FileOutputStream(new File("resource/other/avatar_" + roleId + ".properties"));
                                props.store(fos, "Avatar Path for role " + roleId);
                                fos.close();
                            }
                        }
                    }
                }
            } catch (Exception e) {
                // 出现异常时使用默认头像
                try {
                    String currentSpeciesId = RoleData.getRoleData().getLoginResult().getSpecies_id().toString();
                    ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + currentSpeciesId + ".png", 58, 58);
                    labroleimg.setIcon(defaultIcon);
                } catch (Exception ex) {
                    // 最后的备选方案
                    ImageIcon defaultIcon = CutButtonImage.getImage("img/head/s" + ImageMixDeal.userimg.getRoleShow().getSpecies_id() + ".png", 58, 58);
                    labroleimg.setIcon(defaultIcon);
                }
            }
        }
    }
}

